From 9664bee729d487bcc0a0bc35859f8e13d5421c75 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Wed, 26 Sep 2012 01:10:42 +0000 Subject: Slackware 14.0 Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-) --- source/ap/vim/patches/7.3.155 | 286 ++ source/ap/vim/patches/7.3.156 | 89 + source/ap/vim/patches/7.3.157 | 52 + source/ap/vim/patches/7.3.158 | 48 + source/ap/vim/patches/7.3.159 | 54 + source/ap/vim/patches/7.3.160 | 482 +++ source/ap/vim/patches/7.3.161 | 1645 ++++++++++ source/ap/vim/patches/7.3.162 | 83 + source/ap/vim/patches/7.3.163 | 59 + source/ap/vim/patches/7.3.164 | 181 ++ source/ap/vim/patches/7.3.165 | 47 + source/ap/vim/patches/7.3.166 | 70 + source/ap/vim/patches/7.3.167 | 96 + source/ap/vim/patches/7.3.168 | 82 + source/ap/vim/patches/7.3.169 | 130 + source/ap/vim/patches/7.3.170 | 70 + source/ap/vim/patches/7.3.171 | 142 + source/ap/vim/patches/7.3.172 | 268 ++ source/ap/vim/patches/7.3.173 | 79 + source/ap/vim/patches/7.3.174 | 109 + source/ap/vim/patches/7.3.175 | 50 + source/ap/vim/patches/7.3.176 | 165 + source/ap/vim/patches/7.3.177 | 97 + source/ap/vim/patches/7.3.178 | 163 + source/ap/vim/patches/7.3.179 | 95 + source/ap/vim/patches/7.3.180 | 295 ++ source/ap/vim/patches/7.3.181 | 171 ++ source/ap/vim/patches/7.3.182 | 53 + source/ap/vim/patches/7.3.183 | 87 + source/ap/vim/patches/7.3.184 | 86 + source/ap/vim/patches/7.3.185 | 77 + source/ap/vim/patches/7.3.186 | 59 + source/ap/vim/patches/7.3.187 | 6621 +++++++++++++++++++++++++++++++++++++++++ source/ap/vim/patches/7.3.188 | 184 ++ source/ap/vim/patches/7.3.189 | 49 + source/ap/vim/patches/7.3.190 | 48 + source/ap/vim/patches/7.3.191 | 526 ++++ source/ap/vim/patches/7.3.192 | 61 + source/ap/vim/patches/7.3.193 | 70 + source/ap/vim/patches/7.3.194 | 48 + source/ap/vim/patches/7.3.195 | 199 ++ source/ap/vim/patches/7.3.196 | 224 ++ source/ap/vim/patches/7.3.197 | 78 + source/ap/vim/patches/7.3.198 | 403 +++ source/ap/vim/patches/7.3.199 | 57 + source/ap/vim/patches/7.3.200 | 75 + source/ap/vim/patches/7.3.201 | 124 + source/ap/vim/patches/7.3.202 | 868 ++++++ source/ap/vim/patches/7.3.203 | 102 + source/ap/vim/patches/7.3.204 | 51 + source/ap/vim/patches/7.3.205 | 93 + source/ap/vim/patches/7.3.206 | 54 + source/ap/vim/patches/7.3.207 | 54 + source/ap/vim/patches/7.3.208 | 51 + source/ap/vim/patches/7.3.209 | 95 + source/ap/vim/patches/7.3.210 | 182 ++ source/ap/vim/patches/7.3.211 | 51 + source/ap/vim/patches/7.3.212 | 243 ++ source/ap/vim/patches/7.3.213 | 142 + source/ap/vim/patches/7.3.214 | 55 + source/ap/vim/patches/7.3.215 | 63 + source/ap/vim/patches/7.3.216 | 263 ++ source/ap/vim/patches/7.3.217 | 63 + source/ap/vim/patches/7.3.218 | 91 + source/ap/vim/patches/7.3.219 | 92 + source/ap/vim/patches/7.3.220 | 1230 ++++++++ source/ap/vim/patches/7.3.221 | 287 ++ source/ap/vim/patches/7.3.222 | 71 + source/ap/vim/patches/7.3.223 | 387 +++ source/ap/vim/patches/7.3.224 | 162 + source/ap/vim/patches/7.3.225 | Bin 0 -> 18841 bytes source/ap/vim/patches/7.3.226 | 58 + source/ap/vim/patches/7.3.227 | 109 + source/ap/vim/patches/7.3.228 | 45 + source/ap/vim/patches/7.3.229 | 55 + source/ap/vim/patches/7.3.230 | 70 + source/ap/vim/patches/7.3.231 | 128 + source/ap/vim/patches/7.3.232 | 84 + source/ap/vim/patches/7.3.233 | 81 + source/ap/vim/patches/7.3.234 | 178 ++ source/ap/vim/patches/7.3.235 | 360 +++ source/ap/vim/patches/7.3.236 | 87 + source/ap/vim/patches/7.3.237 | 222 ++ source/ap/vim/patches/7.3.238 | 53 + source/ap/vim/patches/7.3.239 | 321 ++ source/ap/vim/patches/7.3.240 | 795 +++++ source/ap/vim/patches/7.3.241 | 71 + source/ap/vim/patches/7.3.242 | 71 + source/ap/vim/patches/7.3.243 | 52 + source/ap/vim/patches/7.3.244 | 48 + source/ap/vim/patches/7.3.245 | 81 + source/ap/vim/patches/7.3.246 | 55 + source/ap/vim/patches/7.3.247 | 95 + source/ap/vim/patches/7.3.248 | 129 + source/ap/vim/patches/7.3.249 | 134 + source/ap/vim/patches/7.3.250 | 104 + source/ap/vim/patches/7.3.251 | 184 ++ source/ap/vim/patches/7.3.252 | 43 + source/ap/vim/patches/7.3.253 | 539 ++++ source/ap/vim/patches/7.3.254 | 47 + source/ap/vim/patches/7.3.255 | 81 + source/ap/vim/patches/7.3.256 | 322 ++ source/ap/vim/patches/7.3.257 | 97 + source/ap/vim/patches/7.3.258 | 70 + source/ap/vim/patches/7.3.259 | 503 ++++ source/ap/vim/patches/7.3.260 | 69 + source/ap/vim/patches/7.3.261 | 53 + source/ap/vim/patches/7.3.262 | 1356 +++++++++ source/ap/vim/patches/7.3.263 | 162 + source/ap/vim/patches/7.3.264 | 159 + source/ap/vim/patches/7.3.265 | 145 + source/ap/vim/patches/7.3.266 | 54 + source/ap/vim/patches/7.3.267 | 67 + source/ap/vim/patches/7.3.268 | 69 + source/ap/vim/patches/7.3.269 | 112 + source/ap/vim/patches/7.3.270 | 52 + source/ap/vim/patches/7.3.271 | 504 ++++ source/ap/vim/patches/7.3.272 | 51 + source/ap/vim/patches/7.3.273 | 124 + source/ap/vim/patches/7.3.274 | 55 + source/ap/vim/patches/7.3.275 | 77 + source/ap/vim/patches/7.3.276 | 130 + source/ap/vim/patches/7.3.277 | 348 +++ source/ap/vim/patches/7.3.278 | 73 + source/ap/vim/patches/7.3.279 | 118 + source/ap/vim/patches/7.3.280 | 181 ++ source/ap/vim/patches/7.3.281 | 134 + source/ap/vim/patches/7.3.282 | 60 + source/ap/vim/patches/7.3.283 | 114 + source/ap/vim/patches/7.3.284 | 211 ++ source/ap/vim/patches/7.3.285 | 144 + source/ap/vim/patches/7.3.286 | 84 + source/ap/vim/patches/7.3.287 | 100 + source/ap/vim/patches/7.3.288 | 76 + source/ap/vim/patches/7.3.289 | 56 + source/ap/vim/patches/7.3.290 | 75 + source/ap/vim/patches/7.3.291 | 125 + source/ap/vim/patches/7.3.292 | 55 + source/ap/vim/patches/7.3.293 | 74 + source/ap/vim/patches/7.3.294 | 58 + source/ap/vim/patches/7.3.295 | 109 + source/ap/vim/patches/7.3.296 | 222 ++ source/ap/vim/patches/7.3.297 | 130 + source/ap/vim/patches/7.3.298 | 167 ++ source/ap/vim/patches/7.3.299 | 516 ++++ source/ap/vim/patches/7.3.300 | 74 + source/ap/vim/patches/7.3.301 | 97 + source/ap/vim/patches/7.3.302 | 68 + source/ap/vim/patches/7.3.303 | 55 + source/ap/vim/patches/7.3.304 | 103 + source/ap/vim/patches/7.3.305 | 58 + source/ap/vim/patches/7.3.306 | 244 ++ source/ap/vim/patches/7.3.307 | 180 ++ source/ap/vim/patches/7.3.308 | 260 ++ source/ap/vim/patches/7.3.309 | 105 + source/ap/vim/patches/7.3.310 | 3524 ++++++++++++++++++++++ source/ap/vim/patches/7.3.311 | 351 +++ source/ap/vim/patches/7.3.312 | 58 + source/ap/vim/patches/7.3.313 | 53 + source/ap/vim/patches/7.3.314 | 54 + source/ap/vim/patches/7.3.315 | 475 +++ source/ap/vim/patches/7.3.316 | 48 + source/ap/vim/patches/7.3.317 | 116 + source/ap/vim/patches/7.3.318 | 90 + source/ap/vim/patches/7.3.319 | 154 + source/ap/vim/patches/7.3.320 | 130 + source/ap/vim/patches/7.3.321 | 304 ++ source/ap/vim/patches/7.3.322 | 52 + source/ap/vim/patches/7.3.323 | 52 + source/ap/vim/patches/7.3.324 | 53 + source/ap/vim/patches/7.3.325 | 64 + source/ap/vim/patches/7.3.326 | 285 ++ source/ap/vim/patches/7.3.327 | 64 + source/ap/vim/patches/7.3.328 | 45 + source/ap/vim/patches/7.3.329 | 72 + source/ap/vim/patches/7.3.330 | 45 + source/ap/vim/patches/7.3.331 | 53 + source/ap/vim/patches/7.3.332 | 206 ++ source/ap/vim/patches/7.3.333 | 245 ++ source/ap/vim/patches/7.3.334 | 58 + source/ap/vim/patches/7.3.335 | 48 + source/ap/vim/patches/7.3.336 | 1100 +++++++ source/ap/vim/patches/7.3.337 | 58 + source/ap/vim/patches/7.3.338 | 100 + source/ap/vim/patches/7.3.339 | 57 + source/ap/vim/patches/7.3.340 | 62 + source/ap/vim/patches/7.3.341 | 360 +++ source/ap/vim/patches/7.3.342 | 93 + source/ap/vim/patches/7.3.343 | 252 ++ source/ap/vim/patches/7.3.344 | 121 + source/ap/vim/patches/7.3.345 | 48 + source/ap/vim/patches/7.3.346 | 143 + source/ap/vim/patches/7.3.347 | 54 + source/ap/vim/patches/7.3.348 | 57 + source/ap/vim/patches/7.3.349 | 88 + source/ap/vim/patches/7.3.350 | 46 + source/ap/vim/patches/7.3.351 | 46 + source/ap/vim/patches/7.3.352 | 108 + source/ap/vim/patches/7.3.353 | 155 + source/ap/vim/patches/7.3.354 | 71 + source/ap/vim/patches/7.3.355 | 56 + source/ap/vim/patches/7.3.356 | 79 + source/ap/vim/patches/7.3.357 | 52 + source/ap/vim/patches/7.3.358 | 74 + source/ap/vim/patches/7.3.359 | 64 + source/ap/vim/patches/7.3.360 | 61 + source/ap/vim/patches/7.3.361 | 55 + source/ap/vim/patches/7.3.362 | 59 + source/ap/vim/patches/7.3.363 | 110 + source/ap/vim/patches/7.3.364 | 57 + source/ap/vim/patches/7.3.365 | 131 + source/ap/vim/patches/7.3.366 | 76 + source/ap/vim/patches/7.3.367 | 53 + source/ap/vim/patches/7.3.368 | 103 + source/ap/vim/patches/7.3.369 | 48 + source/ap/vim/patches/7.3.370 | 63 + source/ap/vim/patches/7.3.371 | 75 + source/ap/vim/patches/7.3.372 | 52 + source/ap/vim/patches/7.3.373 | 78 + source/ap/vim/patches/7.3.374 | 59 + source/ap/vim/patches/7.3.375 | 64 + source/ap/vim/patches/7.3.376 | 57 + source/ap/vim/patches/7.3.377 | 406 +++ source/ap/vim/patches/7.3.378 | 71 + source/ap/vim/patches/7.3.379 | 112 + source/ap/vim/patches/7.3.380 | 318 ++ source/ap/vim/patches/7.3.381 | 260 ++ source/ap/vim/patches/7.3.382 | 173 ++ source/ap/vim/patches/7.3.383 | 51 + source/ap/vim/patches/7.3.384 | 53 + source/ap/vim/patches/7.3.385 | 69 + source/ap/vim/patches/7.3.386 | 55 + source/ap/vim/patches/7.3.387 | 61 + source/ap/vim/patches/7.3.388 | 45 + source/ap/vim/patches/7.3.389 | 61 + source/ap/vim/patches/7.3.390 | 155 + source/ap/vim/patches/7.3.391 | 51 + source/ap/vim/patches/7.3.392 | 115 + source/ap/vim/patches/7.3.393 | 130 + source/ap/vim/patches/7.3.394 | 62 + source/ap/vim/patches/7.3.395 | 115 + source/ap/vim/patches/7.3.396 | 49 + source/ap/vim/patches/7.3.397 | 224 ++ source/ap/vim/patches/7.3.398 | 65 + source/ap/vim/patches/7.3.399 | 137 + source/ap/vim/patches/7.3.400 | 1762 +++++++++++ source/ap/vim/patches/7.3.401 | 191 ++ source/ap/vim/patches/7.3.402 | 59 + source/ap/vim/patches/7.3.403 | 108 + source/ap/vim/patches/7.3.404 | 85 + source/ap/vim/patches/7.3.405 | 101 + source/ap/vim/patches/7.3.406 | 103 + source/ap/vim/patches/7.3.407 | 270 ++ source/ap/vim/patches/7.3.408 | 48 + source/ap/vim/patches/7.3.409 | 48 + source/ap/vim/patches/7.3.410 | 54 + source/ap/vim/patches/7.3.411 | 55 + source/ap/vim/patches/7.3.412 | 51 + source/ap/vim/patches/7.3.413 | 90 + source/ap/vim/patches/7.3.414 | 90 + source/ap/vim/patches/7.3.415 | 54 + source/ap/vim/patches/7.3.416 | 54 + source/ap/vim/patches/7.3.417 | 47 + source/ap/vim/patches/7.3.418 | 53 + source/ap/vim/patches/7.3.419 | 85 + source/ap/vim/patches/7.3.420 | 70 + source/ap/vim/patches/7.3.421 | 60 + source/ap/vim/patches/7.3.422 | 94 + source/ap/vim/patches/7.3.423 | 130 + source/ap/vim/patches/7.3.424 | 62 + source/ap/vim/patches/7.3.425 | 78 + source/ap/vim/patches/7.3.426 | 279 ++ source/ap/vim/patches/7.3.427 | 378 +++ source/ap/vim/patches/7.3.428 | 113 + source/ap/vim/patches/7.3.429 | 192 ++ source/ap/vim/patches/7.3.430 | 80 + source/ap/vim/patches/7.3.431 | 280 ++ source/ap/vim/patches/7.3.432 | 228 ++ source/ap/vim/patches/7.3.433 | 92 + source/ap/vim/patches/7.3.434 | 233 ++ source/ap/vim/patches/7.3.435 | 63 + source/ap/vim/patches/7.3.436 | 111 + source/ap/vim/patches/7.3.437 | 73 + source/ap/vim/patches/7.3.438 | 126 + source/ap/vim/patches/7.3.439 | 87 + source/ap/vim/patches/7.3.440 | 211 ++ source/ap/vim/patches/7.3.441 | 341 +++ source/ap/vim/patches/7.3.442 | 186 ++ source/ap/vim/patches/7.3.443 | 206 ++ source/ap/vim/patches/7.3.444 | 96 + source/ap/vim/patches/7.3.445 | 199 ++ source/ap/vim/patches/7.3.446 | 164 + source/ap/vim/patches/7.3.447 | 377 +++ source/ap/vim/patches/7.3.448 | 180 ++ source/ap/vim/patches/7.3.449 | 455 +++ source/ap/vim/patches/7.3.450 | 81 + source/ap/vim/patches/7.3.451 | 363 +++ source/ap/vim/patches/7.3.452 | 70 + source/ap/vim/patches/7.3.453 | 58 + source/ap/vim/patches/7.3.454 | 84 + source/ap/vim/patches/7.3.455 | 70 + source/ap/vim/patches/7.3.456 | 376 +++ source/ap/vim/patches/7.3.457 | 81 + source/ap/vim/patches/7.3.458 | 52 + source/ap/vim/patches/7.3.459 | 71 + source/ap/vim/patches/7.3.460 | 89 + source/ap/vim/patches/7.3.461 | 243 ++ source/ap/vim/patches/7.3.462 | 191 ++ source/ap/vim/patches/7.3.463 | 63 + source/ap/vim/patches/7.3.464 | 60 + source/ap/vim/patches/7.3.465 | 398 +++ source/ap/vim/patches/7.3.466 | 49 + source/ap/vim/patches/7.3.467 | 54 + source/ap/vim/patches/7.3.468 | 144 + source/ap/vim/patches/7.3.469 | 53 + source/ap/vim/patches/7.3.470 | 67 + source/ap/vim/patches/7.3.471 | 92 + source/ap/vim/patches/7.3.472 | 88 + source/ap/vim/patches/7.3.473 | 68 + source/ap/vim/patches/7.3.474 | 62 + source/ap/vim/patches/7.3.475 | 98 + source/ap/vim/patches/7.3.476 | 56 + source/ap/vim/patches/7.3.477 | 52 + source/ap/vim/patches/7.3.478 | 46 + source/ap/vim/patches/7.3.479 | 134 + source/ap/vim/patches/7.3.480 | 237 ++ source/ap/vim/patches/7.3.481 | 65 + source/ap/vim/patches/7.3.482 | 57 + source/ap/vim/patches/7.3.483 | 97 + source/ap/vim/patches/7.3.484 | 62 + source/ap/vim/patches/7.3.485 | 52 + source/ap/vim/patches/7.3.486 | 58 + source/ap/vim/patches/7.3.487 | 572 ++++ source/ap/vim/patches/7.3.488 | 52 + source/ap/vim/patches/7.3.489 | 89 + source/ap/vim/patches/7.3.490 | 2517 ++++++++++++++++ source/ap/vim/patches/7.3.491 | 235 ++ source/ap/vim/patches/7.3.492 | 718 +++++ source/ap/vim/patches/7.3.493 | 54 + source/ap/vim/patches/7.3.494 | 186 ++ source/ap/vim/patches/7.3.495 | 124 + source/ap/vim/patches/7.3.496 | 69 + source/ap/vim/patches/7.3.497 | 50 + source/ap/vim/patches/7.3.498 | 63 + source/ap/vim/patches/7.3.499 | 84 + source/ap/vim/patches/7.3.500 | 46 + source/ap/vim/patches/7.3.501 | 63 + source/ap/vim/patches/7.3.502 | 67 + source/ap/vim/patches/7.3.503 | 51 + source/ap/vim/patches/7.3.504 | 87 + source/ap/vim/patches/7.3.505 | 116 + source/ap/vim/patches/7.3.506 | 100 + source/ap/vim/patches/7.3.507 | 149 + source/ap/vim/patches/7.3.508 | 85 + source/ap/vim/patches/7.3.509 | 304 ++ source/ap/vim/patches/7.3.510 | 53 + source/ap/vim/patches/7.3.511 | 49 + source/ap/vim/patches/7.3.512 | 70 + source/ap/vim/patches/7.3.513 | 129 + source/ap/vim/patches/7.3.514 | 232 ++ source/ap/vim/patches/7.3.515 | 68 + source/ap/vim/patches/7.3.516 | 94 + source/ap/vim/patches/7.3.517 | 60 + source/ap/vim/patches/7.3.518 | 57 + source/ap/vim/patches/7.3.519 | 64 + source/ap/vim/patches/7.3.520 | 140 + source/ap/vim/patches/7.3.521 | 129 + source/ap/vim/patches/7.3.522 | 56 + source/ap/vim/patches/7.3.523 | 103 + source/ap/vim/patches/7.3.524 | 46 + source/ap/vim/patches/7.3.525 | 55 + source/ap/vim/patches/7.3.526 | 59 + source/ap/vim/patches/7.3.527 | 59 + source/ap/vim/patches/7.3.528 | 171 ++ source/ap/vim/patches/7.3.529 | 81 + source/ap/vim/patches/7.3.530 | 50 + source/ap/vim/patches/7.3.531 | 52 + source/ap/vim/patches/7.3.532 | 53 + source/ap/vim/patches/7.3.533 | 46 + source/ap/vim/patches/7.3.534 | 101 + source/ap/vim/patches/7.3.535 | 356 +++ source/ap/vim/patches/7.3.536 | 73 + source/ap/vim/patches/7.3.537 | 47 + source/ap/vim/patches/7.3.538 | 321 ++ source/ap/vim/patches/7.3.539 | 51 + source/ap/vim/patches/7.3.540 | 55 + source/ap/vim/patches/7.3.541 | 1090 +++++++ source/ap/vim/patches/7.3.542 | 73 + source/ap/vim/patches/7.3.543 | 55 + source/ap/vim/patches/7.3.544 | 81 + source/ap/vim/patches/7.3.545 | 359 +++ source/ap/vim/patches/7.3.546 | 54 + source/ap/vim/patches/7.3.547 | 52 + source/ap/vim/patches/7.3.548 | 53 + source/ap/vim/patches/7.3.549 | 125 + source/ap/vim/patches/7.3.550 | 160 + source/ap/vim/patches/7.3.551 | 494 +++ source/ap/vim/patches/7.3.552 | 582 ++++ source/ap/vim/patches/7.3.553 | 85 + source/ap/vim/patches/7.3.554 | 52 + source/ap/vim/patches/7.3.555 | 232 ++ source/ap/vim/patches/7.3.556 | 70 + source/ap/vim/patches/7.3.557 | 99 + source/ap/vim/patches/7.3.558 | 90 + source/ap/vim/patches/7.3.559 | 131 + source/ap/vim/patches/7.3.560 | 49 + source/ap/vim/patches/7.3.561 | 52 + source/ap/vim/patches/7.3.562 | 63 + source/ap/vim/patches/7.3.563 | 97 + source/ap/vim/patches/7.3.564 | 53 + source/ap/vim/patches/7.3.565 | 52 + source/ap/vim/patches/7.3.566 | 83 + source/ap/vim/patches/7.3.567 | 56 + source/ap/vim/patches/7.3.568 | 138 + source/ap/vim/patches/7.3.569 | 4762 +++++++++++++++++++++++++++++ source/ap/vim/patches/7.3.570 | 145 + source/ap/vim/patches/7.3.571 | 117 + source/ap/vim/patches/7.3.572 | 59 + source/ap/vim/patches/7.3.573 | 52 + source/ap/vim/patches/7.3.574 | 88 + source/ap/vim/patches/7.3.575 | 60 + source/ap/vim/patches/7.3.576 | 255 ++ source/ap/vim/patches/7.3.577 | 273 ++ source/ap/vim/patches/7.3.578 | 80 + source/ap/vim/patches/7.3.579 | 232 ++ source/ap/vim/patches/7.3.580 | 52 + source/ap/vim/patches/7.3.581 | 117 + source/ap/vim/patches/7.3.582 | 61 + source/ap/vim/patches/7.3.583 | 79 + source/ap/vim/patches/7.3.584 | 134 + source/ap/vim/patches/7.3.585 | 56 + source/ap/vim/patches/7.3.586 | 103 + source/ap/vim/patches/7.3.587 | 84 + source/ap/vim/patches/7.3.588 | 85 + source/ap/vim/patches/7.3.589 | 69 + source/ap/vim/patches/7.3.590 | 61 + source/ap/vim/patches/7.3.591 | 208 ++ source/ap/vim/patches/7.3.592 | 126 + source/ap/vim/patches/7.3.593 | 81 + source/ap/vim/patches/7.3.594 | 171 ++ source/ap/vim/patches/7.3.595 | 154 + source/ap/vim/patches/7.3.596 | 171 ++ source/ap/vim/patches/7.3.597 | 720 +++++ source/ap/vim/patches/7.3.598 | 73 + source/ap/vim/patches/7.3.599 | 107 + source/ap/vim/patches/7.3.600 | 68 + source/ap/vim/patches/7.3.601 | 51 + source/ap/vim/patches/7.3.602 | 55 + source/ap/vim/patches/7.3.603 | 370 +++ source/ap/vim/patches/7.3.604 | 60 + source/ap/vim/patches/7.3.605 | 86 + source/ap/vim/patches/7.3.606 | 76 + source/ap/vim/patches/7.3.607 | 56 + source/ap/vim/patches/7.3.608 | 119 + source/ap/vim/patches/7.3.609 | 251 ++ source/ap/vim/patches/7.3.610 | 400 +++ source/ap/vim/patches/7.3.611 | 58 + source/ap/vim/patches/7.3.612 | 83 + source/ap/vim/patches/7.3.613 | 149 + source/ap/vim/patches/7.3.614 | 176 ++ source/ap/vim/patches/7.3.615 | 107 + source/ap/vim/patches/7.3.616 | 46 + source/ap/vim/patches/7.3.617 | 65 + source/ap/vim/patches/7.3.618 | 367 +++ source/ap/vim/patches/7.3.619 | 50 + source/ap/vim/patches/7.3.620 | 163 + source/ap/vim/patches/7.3.621 | 72 + source/ap/vim/patches/7.3.622 | 56 + source/ap/vim/patches/7.3.623 | 92 + source/ap/vim/patches/7.3.624 | 52 + source/ap/vim/patches/7.3.625 | 140 + source/ap/vim/patches/7.3.626 | 49 + source/ap/vim/patches/7.3.627 | 102 + source/ap/vim/patches/7.3.628 | 54 + source/ap/vim/patches/7.3.629 | 437 +++ source/ap/vim/patches/7.3.630 | 48 + source/ap/vim/patches/7.3.631 | 322 ++ source/ap/vim/patches/7.3.632 | 537 ++++ source/ap/vim/patches/7.3.633 | 81 + source/ap/vim/patches/7.3.634 | 57 + source/ap/vim/patches/7.3.635 | 50 + source/ap/vim/patches/7.3.636 | 148 + source/ap/vim/patches/7.3.637 | 94 + source/ap/vim/patches/7.3.638 | 55 + source/ap/vim/patches/7.3.639 | 846 ++++++ source/ap/vim/patches/7.3.640 | Bin 0 -> 455297 bytes source/ap/vim/patches/7.3.641 | 68 + source/ap/vim/patches/7.3.642 | 55 + source/ap/vim/patches/7.3.643 | 73 + source/ap/vim/patches/7.3.644 | 72 + source/ap/vim/patches/7.3.645 | 118 + 491 files changed, 87657 insertions(+) create mode 100644 source/ap/vim/patches/7.3.155 create mode 100644 source/ap/vim/patches/7.3.156 create mode 100644 source/ap/vim/patches/7.3.157 create mode 100644 source/ap/vim/patches/7.3.158 create mode 100644 source/ap/vim/patches/7.3.159 create mode 100644 source/ap/vim/patches/7.3.160 create mode 100644 source/ap/vim/patches/7.3.161 create mode 100644 source/ap/vim/patches/7.3.162 create mode 100644 source/ap/vim/patches/7.3.163 create mode 100644 source/ap/vim/patches/7.3.164 create mode 100644 source/ap/vim/patches/7.3.165 create mode 100644 source/ap/vim/patches/7.3.166 create mode 100644 source/ap/vim/patches/7.3.167 create mode 100644 source/ap/vim/patches/7.3.168 create mode 100644 source/ap/vim/patches/7.3.169 create mode 100644 source/ap/vim/patches/7.3.170 create mode 100644 source/ap/vim/patches/7.3.171 create mode 100644 source/ap/vim/patches/7.3.172 create mode 100644 source/ap/vim/patches/7.3.173 create mode 100644 source/ap/vim/patches/7.3.174 create mode 100644 source/ap/vim/patches/7.3.175 create mode 100644 source/ap/vim/patches/7.3.176 create mode 100644 source/ap/vim/patches/7.3.177 create mode 100644 source/ap/vim/patches/7.3.178 create mode 100644 source/ap/vim/patches/7.3.179 create mode 100644 source/ap/vim/patches/7.3.180 create mode 100644 source/ap/vim/patches/7.3.181 create mode 100644 source/ap/vim/patches/7.3.182 create mode 100644 source/ap/vim/patches/7.3.183 create mode 100644 source/ap/vim/patches/7.3.184 create mode 100644 source/ap/vim/patches/7.3.185 create mode 100644 source/ap/vim/patches/7.3.186 create mode 100644 source/ap/vim/patches/7.3.187 create mode 100644 source/ap/vim/patches/7.3.188 create mode 100644 source/ap/vim/patches/7.3.189 create mode 100644 source/ap/vim/patches/7.3.190 create mode 100644 source/ap/vim/patches/7.3.191 create mode 100644 source/ap/vim/patches/7.3.192 create mode 100644 source/ap/vim/patches/7.3.193 create mode 100644 source/ap/vim/patches/7.3.194 create mode 100644 source/ap/vim/patches/7.3.195 create mode 100644 source/ap/vim/patches/7.3.196 create mode 100644 source/ap/vim/patches/7.3.197 create mode 100644 source/ap/vim/patches/7.3.198 create mode 100644 source/ap/vim/patches/7.3.199 create mode 100644 source/ap/vim/patches/7.3.200 create mode 100644 source/ap/vim/patches/7.3.201 create mode 100644 source/ap/vim/patches/7.3.202 create mode 100644 source/ap/vim/patches/7.3.203 create mode 100644 source/ap/vim/patches/7.3.204 create mode 100644 source/ap/vim/patches/7.3.205 create mode 100644 source/ap/vim/patches/7.3.206 create mode 100644 source/ap/vim/patches/7.3.207 create mode 100644 source/ap/vim/patches/7.3.208 create mode 100644 source/ap/vim/patches/7.3.209 create mode 100644 source/ap/vim/patches/7.3.210 create mode 100644 source/ap/vim/patches/7.3.211 create mode 100644 source/ap/vim/patches/7.3.212 create mode 100644 source/ap/vim/patches/7.3.213 create mode 100644 source/ap/vim/patches/7.3.214 create mode 100644 source/ap/vim/patches/7.3.215 create mode 100644 source/ap/vim/patches/7.3.216 create mode 100644 source/ap/vim/patches/7.3.217 create mode 100644 source/ap/vim/patches/7.3.218 create mode 100644 source/ap/vim/patches/7.3.219 create mode 100644 source/ap/vim/patches/7.3.220 create mode 100644 source/ap/vim/patches/7.3.221 create mode 100644 source/ap/vim/patches/7.3.222 create mode 100644 source/ap/vim/patches/7.3.223 create mode 100644 source/ap/vim/patches/7.3.224 create mode 100644 source/ap/vim/patches/7.3.225 create mode 100644 source/ap/vim/patches/7.3.226 create mode 100644 source/ap/vim/patches/7.3.227 create mode 100644 source/ap/vim/patches/7.3.228 create mode 100644 source/ap/vim/patches/7.3.229 create mode 100644 source/ap/vim/patches/7.3.230 create mode 100644 source/ap/vim/patches/7.3.231 create mode 100644 source/ap/vim/patches/7.3.232 create mode 100644 source/ap/vim/patches/7.3.233 create mode 100644 source/ap/vim/patches/7.3.234 create mode 100644 source/ap/vim/patches/7.3.235 create mode 100644 source/ap/vim/patches/7.3.236 create mode 100644 source/ap/vim/patches/7.3.237 create mode 100644 source/ap/vim/patches/7.3.238 create mode 100644 source/ap/vim/patches/7.3.239 create mode 100644 source/ap/vim/patches/7.3.240 create mode 100644 source/ap/vim/patches/7.3.241 create mode 100644 source/ap/vim/patches/7.3.242 create mode 100644 source/ap/vim/patches/7.3.243 create mode 100644 source/ap/vim/patches/7.3.244 create mode 100644 source/ap/vim/patches/7.3.245 create mode 100644 source/ap/vim/patches/7.3.246 create mode 100644 source/ap/vim/patches/7.3.247 create mode 100644 source/ap/vim/patches/7.3.248 create mode 100644 source/ap/vim/patches/7.3.249 create mode 100644 source/ap/vim/patches/7.3.250 create mode 100644 source/ap/vim/patches/7.3.251 create mode 100644 source/ap/vim/patches/7.3.252 create mode 100644 source/ap/vim/patches/7.3.253 create mode 100644 source/ap/vim/patches/7.3.254 create mode 100644 source/ap/vim/patches/7.3.255 create mode 100644 source/ap/vim/patches/7.3.256 create mode 100644 source/ap/vim/patches/7.3.257 create mode 100644 source/ap/vim/patches/7.3.258 create mode 100644 source/ap/vim/patches/7.3.259 create mode 100644 source/ap/vim/patches/7.3.260 create mode 100644 source/ap/vim/patches/7.3.261 create mode 100644 source/ap/vim/patches/7.3.262 create mode 100644 source/ap/vim/patches/7.3.263 create mode 100644 source/ap/vim/patches/7.3.264 create mode 100644 source/ap/vim/patches/7.3.265 create mode 100644 source/ap/vim/patches/7.3.266 create mode 100644 source/ap/vim/patches/7.3.267 create mode 100644 source/ap/vim/patches/7.3.268 create mode 100644 source/ap/vim/patches/7.3.269 create mode 100644 source/ap/vim/patches/7.3.270 create mode 100644 source/ap/vim/patches/7.3.271 create mode 100644 source/ap/vim/patches/7.3.272 create mode 100644 source/ap/vim/patches/7.3.273 create mode 100644 source/ap/vim/patches/7.3.274 create mode 100644 source/ap/vim/patches/7.3.275 create mode 100644 source/ap/vim/patches/7.3.276 create mode 100644 source/ap/vim/patches/7.3.277 create mode 100644 source/ap/vim/patches/7.3.278 create mode 100644 source/ap/vim/patches/7.3.279 create mode 100644 source/ap/vim/patches/7.3.280 create mode 100644 source/ap/vim/patches/7.3.281 create mode 100644 source/ap/vim/patches/7.3.282 create mode 100644 source/ap/vim/patches/7.3.283 create mode 100644 source/ap/vim/patches/7.3.284 create mode 100644 source/ap/vim/patches/7.3.285 create mode 100644 source/ap/vim/patches/7.3.286 create mode 100644 source/ap/vim/patches/7.3.287 create mode 100644 source/ap/vim/patches/7.3.288 create mode 100644 source/ap/vim/patches/7.3.289 create mode 100644 source/ap/vim/patches/7.3.290 create mode 100644 source/ap/vim/patches/7.3.291 create mode 100644 source/ap/vim/patches/7.3.292 create mode 100644 source/ap/vim/patches/7.3.293 create mode 100644 source/ap/vim/patches/7.3.294 create mode 100644 source/ap/vim/patches/7.3.295 create mode 100644 source/ap/vim/patches/7.3.296 create mode 100644 source/ap/vim/patches/7.3.297 create mode 100644 source/ap/vim/patches/7.3.298 create mode 100644 source/ap/vim/patches/7.3.299 create mode 100644 source/ap/vim/patches/7.3.300 create mode 100644 source/ap/vim/patches/7.3.301 create mode 100644 source/ap/vim/patches/7.3.302 create mode 100644 source/ap/vim/patches/7.3.303 create mode 100644 source/ap/vim/patches/7.3.304 create mode 100644 source/ap/vim/patches/7.3.305 create mode 100644 source/ap/vim/patches/7.3.306 create mode 100644 source/ap/vim/patches/7.3.307 create mode 100644 source/ap/vim/patches/7.3.308 create mode 100644 source/ap/vim/patches/7.3.309 create mode 100644 source/ap/vim/patches/7.3.310 create mode 100644 source/ap/vim/patches/7.3.311 create mode 100644 source/ap/vim/patches/7.3.312 create mode 100644 source/ap/vim/patches/7.3.313 create mode 100644 source/ap/vim/patches/7.3.314 create mode 100644 source/ap/vim/patches/7.3.315 create mode 100644 source/ap/vim/patches/7.3.316 create mode 100644 source/ap/vim/patches/7.3.317 create mode 100644 source/ap/vim/patches/7.3.318 create mode 100644 source/ap/vim/patches/7.3.319 create mode 100644 source/ap/vim/patches/7.3.320 create mode 100644 source/ap/vim/patches/7.3.321 create mode 100644 source/ap/vim/patches/7.3.322 create mode 100644 source/ap/vim/patches/7.3.323 create mode 100644 source/ap/vim/patches/7.3.324 create mode 100644 source/ap/vim/patches/7.3.325 create mode 100644 source/ap/vim/patches/7.3.326 create mode 100644 source/ap/vim/patches/7.3.327 create mode 100644 source/ap/vim/patches/7.3.328 create mode 100644 source/ap/vim/patches/7.3.329 create mode 100644 source/ap/vim/patches/7.3.330 create mode 100644 source/ap/vim/patches/7.3.331 create mode 100644 source/ap/vim/patches/7.3.332 create mode 100644 source/ap/vim/patches/7.3.333 create mode 100644 source/ap/vim/patches/7.3.334 create mode 100644 source/ap/vim/patches/7.3.335 create mode 100644 source/ap/vim/patches/7.3.336 create mode 100644 source/ap/vim/patches/7.3.337 create mode 100644 source/ap/vim/patches/7.3.338 create mode 100644 source/ap/vim/patches/7.3.339 create mode 100644 source/ap/vim/patches/7.3.340 create mode 100644 source/ap/vim/patches/7.3.341 create mode 100644 source/ap/vim/patches/7.3.342 create mode 100644 source/ap/vim/patches/7.3.343 create mode 100644 source/ap/vim/patches/7.3.344 create mode 100644 source/ap/vim/patches/7.3.345 create mode 100644 source/ap/vim/patches/7.3.346 create mode 100644 source/ap/vim/patches/7.3.347 create mode 100644 source/ap/vim/patches/7.3.348 create mode 100644 source/ap/vim/patches/7.3.349 create mode 100644 source/ap/vim/patches/7.3.350 create mode 100644 source/ap/vim/patches/7.3.351 create mode 100644 source/ap/vim/patches/7.3.352 create mode 100644 source/ap/vim/patches/7.3.353 create mode 100644 source/ap/vim/patches/7.3.354 create mode 100644 source/ap/vim/patches/7.3.355 create mode 100644 source/ap/vim/patches/7.3.356 create mode 100644 source/ap/vim/patches/7.3.357 create mode 100644 source/ap/vim/patches/7.3.358 create mode 100644 source/ap/vim/patches/7.3.359 create mode 100644 source/ap/vim/patches/7.3.360 create mode 100644 source/ap/vim/patches/7.3.361 create mode 100644 source/ap/vim/patches/7.3.362 create mode 100644 source/ap/vim/patches/7.3.363 create mode 100644 source/ap/vim/patches/7.3.364 create mode 100644 source/ap/vim/patches/7.3.365 create mode 100644 source/ap/vim/patches/7.3.366 create mode 100644 source/ap/vim/patches/7.3.367 create mode 100644 source/ap/vim/patches/7.3.368 create mode 100644 source/ap/vim/patches/7.3.369 create mode 100644 source/ap/vim/patches/7.3.370 create mode 100644 source/ap/vim/patches/7.3.371 create mode 100644 source/ap/vim/patches/7.3.372 create mode 100644 source/ap/vim/patches/7.3.373 create mode 100644 source/ap/vim/patches/7.3.374 create mode 100644 source/ap/vim/patches/7.3.375 create mode 100644 source/ap/vim/patches/7.3.376 create mode 100644 source/ap/vim/patches/7.3.377 create mode 100644 source/ap/vim/patches/7.3.378 create mode 100644 source/ap/vim/patches/7.3.379 create mode 100644 source/ap/vim/patches/7.3.380 create mode 100644 source/ap/vim/patches/7.3.381 create mode 100644 source/ap/vim/patches/7.3.382 create mode 100644 source/ap/vim/patches/7.3.383 create mode 100644 source/ap/vim/patches/7.3.384 create mode 100644 source/ap/vim/patches/7.3.385 create mode 100644 source/ap/vim/patches/7.3.386 create mode 100644 source/ap/vim/patches/7.3.387 create mode 100644 source/ap/vim/patches/7.3.388 create mode 100644 source/ap/vim/patches/7.3.389 create mode 100644 source/ap/vim/patches/7.3.390 create mode 100644 source/ap/vim/patches/7.3.391 create mode 100644 source/ap/vim/patches/7.3.392 create mode 100644 source/ap/vim/patches/7.3.393 create mode 100644 source/ap/vim/patches/7.3.394 create mode 100644 source/ap/vim/patches/7.3.395 create mode 100644 source/ap/vim/patches/7.3.396 create mode 100644 source/ap/vim/patches/7.3.397 create mode 100644 source/ap/vim/patches/7.3.398 create mode 100644 source/ap/vim/patches/7.3.399 create mode 100644 source/ap/vim/patches/7.3.400 create mode 100644 source/ap/vim/patches/7.3.401 create mode 100644 source/ap/vim/patches/7.3.402 create mode 100644 source/ap/vim/patches/7.3.403 create mode 100644 source/ap/vim/patches/7.3.404 create mode 100644 source/ap/vim/patches/7.3.405 create mode 100644 source/ap/vim/patches/7.3.406 create mode 100644 source/ap/vim/patches/7.3.407 create mode 100644 source/ap/vim/patches/7.3.408 create mode 100644 source/ap/vim/patches/7.3.409 create mode 100644 source/ap/vim/patches/7.3.410 create mode 100644 source/ap/vim/patches/7.3.411 create mode 100644 source/ap/vim/patches/7.3.412 create mode 100644 source/ap/vim/patches/7.3.413 create mode 100644 source/ap/vim/patches/7.3.414 create mode 100644 source/ap/vim/patches/7.3.415 create mode 100644 source/ap/vim/patches/7.3.416 create mode 100644 source/ap/vim/patches/7.3.417 create mode 100644 source/ap/vim/patches/7.3.418 create mode 100644 source/ap/vim/patches/7.3.419 create mode 100644 source/ap/vim/patches/7.3.420 create mode 100644 source/ap/vim/patches/7.3.421 create mode 100644 source/ap/vim/patches/7.3.422 create mode 100644 source/ap/vim/patches/7.3.423 create mode 100644 source/ap/vim/patches/7.3.424 create mode 100644 source/ap/vim/patches/7.3.425 create mode 100644 source/ap/vim/patches/7.3.426 create mode 100644 source/ap/vim/patches/7.3.427 create mode 100644 source/ap/vim/patches/7.3.428 create mode 100644 source/ap/vim/patches/7.3.429 create mode 100644 source/ap/vim/patches/7.3.430 create mode 100644 source/ap/vim/patches/7.3.431 create mode 100644 source/ap/vim/patches/7.3.432 create mode 100644 source/ap/vim/patches/7.3.433 create mode 100644 source/ap/vim/patches/7.3.434 create mode 100644 source/ap/vim/patches/7.3.435 create mode 100644 source/ap/vim/patches/7.3.436 create mode 100644 source/ap/vim/patches/7.3.437 create mode 100644 source/ap/vim/patches/7.3.438 create mode 100644 source/ap/vim/patches/7.3.439 create mode 100644 source/ap/vim/patches/7.3.440 create mode 100644 source/ap/vim/patches/7.3.441 create mode 100644 source/ap/vim/patches/7.3.442 create mode 100644 source/ap/vim/patches/7.3.443 create mode 100644 source/ap/vim/patches/7.3.444 create mode 100644 source/ap/vim/patches/7.3.445 create mode 100644 source/ap/vim/patches/7.3.446 create mode 100644 source/ap/vim/patches/7.3.447 create mode 100644 source/ap/vim/patches/7.3.448 create mode 100644 source/ap/vim/patches/7.3.449 create mode 100644 source/ap/vim/patches/7.3.450 create mode 100644 source/ap/vim/patches/7.3.451 create mode 100644 source/ap/vim/patches/7.3.452 create mode 100644 source/ap/vim/patches/7.3.453 create mode 100644 source/ap/vim/patches/7.3.454 create mode 100644 source/ap/vim/patches/7.3.455 create mode 100644 source/ap/vim/patches/7.3.456 create mode 100644 source/ap/vim/patches/7.3.457 create mode 100644 source/ap/vim/patches/7.3.458 create mode 100644 source/ap/vim/patches/7.3.459 create mode 100644 source/ap/vim/patches/7.3.460 create mode 100644 source/ap/vim/patches/7.3.461 create mode 100644 source/ap/vim/patches/7.3.462 create mode 100644 source/ap/vim/patches/7.3.463 create mode 100644 source/ap/vim/patches/7.3.464 create mode 100644 source/ap/vim/patches/7.3.465 create mode 100644 source/ap/vim/patches/7.3.466 create mode 100644 source/ap/vim/patches/7.3.467 create mode 100644 source/ap/vim/patches/7.3.468 create mode 100644 source/ap/vim/patches/7.3.469 create mode 100644 source/ap/vim/patches/7.3.470 create mode 100644 source/ap/vim/patches/7.3.471 create mode 100644 source/ap/vim/patches/7.3.472 create mode 100644 source/ap/vim/patches/7.3.473 create mode 100644 source/ap/vim/patches/7.3.474 create mode 100644 source/ap/vim/patches/7.3.475 create mode 100644 source/ap/vim/patches/7.3.476 create mode 100644 source/ap/vim/patches/7.3.477 create mode 100644 source/ap/vim/patches/7.3.478 create mode 100644 source/ap/vim/patches/7.3.479 create mode 100644 source/ap/vim/patches/7.3.480 create mode 100644 source/ap/vim/patches/7.3.481 create mode 100644 source/ap/vim/patches/7.3.482 create mode 100644 source/ap/vim/patches/7.3.483 create mode 100644 source/ap/vim/patches/7.3.484 create mode 100644 source/ap/vim/patches/7.3.485 create mode 100644 source/ap/vim/patches/7.3.486 create mode 100644 source/ap/vim/patches/7.3.487 create mode 100644 source/ap/vim/patches/7.3.488 create mode 100644 source/ap/vim/patches/7.3.489 create mode 100644 source/ap/vim/patches/7.3.490 create mode 100644 source/ap/vim/patches/7.3.491 create mode 100644 source/ap/vim/patches/7.3.492 create mode 100644 source/ap/vim/patches/7.3.493 create mode 100644 source/ap/vim/patches/7.3.494 create mode 100644 source/ap/vim/patches/7.3.495 create mode 100644 source/ap/vim/patches/7.3.496 create mode 100644 source/ap/vim/patches/7.3.497 create mode 100644 source/ap/vim/patches/7.3.498 create mode 100644 source/ap/vim/patches/7.3.499 create mode 100644 source/ap/vim/patches/7.3.500 create mode 100644 source/ap/vim/patches/7.3.501 create mode 100644 source/ap/vim/patches/7.3.502 create mode 100644 source/ap/vim/patches/7.3.503 create mode 100644 source/ap/vim/patches/7.3.504 create mode 100644 source/ap/vim/patches/7.3.505 create mode 100644 source/ap/vim/patches/7.3.506 create mode 100644 source/ap/vim/patches/7.3.507 create mode 100644 source/ap/vim/patches/7.3.508 create mode 100644 source/ap/vim/patches/7.3.509 create mode 100644 source/ap/vim/patches/7.3.510 create mode 100644 source/ap/vim/patches/7.3.511 create mode 100644 source/ap/vim/patches/7.3.512 create mode 100644 source/ap/vim/patches/7.3.513 create mode 100644 source/ap/vim/patches/7.3.514 create mode 100644 source/ap/vim/patches/7.3.515 create mode 100644 source/ap/vim/patches/7.3.516 create mode 100644 source/ap/vim/patches/7.3.517 create mode 100644 source/ap/vim/patches/7.3.518 create mode 100644 source/ap/vim/patches/7.3.519 create mode 100644 source/ap/vim/patches/7.3.520 create mode 100644 source/ap/vim/patches/7.3.521 create mode 100644 source/ap/vim/patches/7.3.522 create mode 100644 source/ap/vim/patches/7.3.523 create mode 100644 source/ap/vim/patches/7.3.524 create mode 100644 source/ap/vim/patches/7.3.525 create mode 100644 source/ap/vim/patches/7.3.526 create mode 100644 source/ap/vim/patches/7.3.527 create mode 100644 source/ap/vim/patches/7.3.528 create mode 100644 source/ap/vim/patches/7.3.529 create mode 100644 source/ap/vim/patches/7.3.530 create mode 100644 source/ap/vim/patches/7.3.531 create mode 100644 source/ap/vim/patches/7.3.532 create mode 100644 source/ap/vim/patches/7.3.533 create mode 100644 source/ap/vim/patches/7.3.534 create mode 100644 source/ap/vim/patches/7.3.535 create mode 100644 source/ap/vim/patches/7.3.536 create mode 100644 source/ap/vim/patches/7.3.537 create mode 100644 source/ap/vim/patches/7.3.538 create mode 100644 source/ap/vim/patches/7.3.539 create mode 100644 source/ap/vim/patches/7.3.540 create mode 100644 source/ap/vim/patches/7.3.541 create mode 100644 source/ap/vim/patches/7.3.542 create mode 100644 source/ap/vim/patches/7.3.543 create mode 100644 source/ap/vim/patches/7.3.544 create mode 100644 source/ap/vim/patches/7.3.545 create mode 100644 source/ap/vim/patches/7.3.546 create mode 100644 source/ap/vim/patches/7.3.547 create mode 100644 source/ap/vim/patches/7.3.548 create mode 100644 source/ap/vim/patches/7.3.549 create mode 100644 source/ap/vim/patches/7.3.550 create mode 100644 source/ap/vim/patches/7.3.551 create mode 100644 source/ap/vim/patches/7.3.552 create mode 100644 source/ap/vim/patches/7.3.553 create mode 100644 source/ap/vim/patches/7.3.554 create mode 100644 source/ap/vim/patches/7.3.555 create mode 100644 source/ap/vim/patches/7.3.556 create mode 100644 source/ap/vim/patches/7.3.557 create mode 100644 source/ap/vim/patches/7.3.558 create mode 100644 source/ap/vim/patches/7.3.559 create mode 100644 source/ap/vim/patches/7.3.560 create mode 100644 source/ap/vim/patches/7.3.561 create mode 100644 source/ap/vim/patches/7.3.562 create mode 100644 source/ap/vim/patches/7.3.563 create mode 100644 source/ap/vim/patches/7.3.564 create mode 100644 source/ap/vim/patches/7.3.565 create mode 100644 source/ap/vim/patches/7.3.566 create mode 100644 source/ap/vim/patches/7.3.567 create mode 100644 source/ap/vim/patches/7.3.568 create mode 100644 source/ap/vim/patches/7.3.569 create mode 100644 source/ap/vim/patches/7.3.570 create mode 100644 source/ap/vim/patches/7.3.571 create mode 100644 source/ap/vim/patches/7.3.572 create mode 100644 source/ap/vim/patches/7.3.573 create mode 100644 source/ap/vim/patches/7.3.574 create mode 100644 source/ap/vim/patches/7.3.575 create mode 100644 source/ap/vim/patches/7.3.576 create mode 100644 source/ap/vim/patches/7.3.577 create mode 100644 source/ap/vim/patches/7.3.578 create mode 100644 source/ap/vim/patches/7.3.579 create mode 100644 source/ap/vim/patches/7.3.580 create mode 100644 source/ap/vim/patches/7.3.581 create mode 100644 source/ap/vim/patches/7.3.582 create mode 100644 source/ap/vim/patches/7.3.583 create mode 100644 source/ap/vim/patches/7.3.584 create mode 100644 source/ap/vim/patches/7.3.585 create mode 100644 source/ap/vim/patches/7.3.586 create mode 100644 source/ap/vim/patches/7.3.587 create mode 100644 source/ap/vim/patches/7.3.588 create mode 100644 source/ap/vim/patches/7.3.589 create mode 100644 source/ap/vim/patches/7.3.590 create mode 100644 source/ap/vim/patches/7.3.591 create mode 100644 source/ap/vim/patches/7.3.592 create mode 100644 source/ap/vim/patches/7.3.593 create mode 100644 source/ap/vim/patches/7.3.594 create mode 100644 source/ap/vim/patches/7.3.595 create mode 100644 source/ap/vim/patches/7.3.596 create mode 100644 source/ap/vim/patches/7.3.597 create mode 100644 source/ap/vim/patches/7.3.598 create mode 100644 source/ap/vim/patches/7.3.599 create mode 100644 source/ap/vim/patches/7.3.600 create mode 100644 source/ap/vim/patches/7.3.601 create mode 100644 source/ap/vim/patches/7.3.602 create mode 100644 source/ap/vim/patches/7.3.603 create mode 100644 source/ap/vim/patches/7.3.604 create mode 100644 source/ap/vim/patches/7.3.605 create mode 100644 source/ap/vim/patches/7.3.606 create mode 100644 source/ap/vim/patches/7.3.607 create mode 100644 source/ap/vim/patches/7.3.608 create mode 100644 source/ap/vim/patches/7.3.609 create mode 100644 source/ap/vim/patches/7.3.610 create mode 100644 source/ap/vim/patches/7.3.611 create mode 100644 source/ap/vim/patches/7.3.612 create mode 100644 source/ap/vim/patches/7.3.613 create mode 100644 source/ap/vim/patches/7.3.614 create mode 100644 source/ap/vim/patches/7.3.615 create mode 100644 source/ap/vim/patches/7.3.616 create mode 100644 source/ap/vim/patches/7.3.617 create mode 100644 source/ap/vim/patches/7.3.618 create mode 100644 source/ap/vim/patches/7.3.619 create mode 100644 source/ap/vim/patches/7.3.620 create mode 100644 source/ap/vim/patches/7.3.621 create mode 100644 source/ap/vim/patches/7.3.622 create mode 100644 source/ap/vim/patches/7.3.623 create mode 100644 source/ap/vim/patches/7.3.624 create mode 100644 source/ap/vim/patches/7.3.625 create mode 100644 source/ap/vim/patches/7.3.626 create mode 100644 source/ap/vim/patches/7.3.627 create mode 100644 source/ap/vim/patches/7.3.628 create mode 100644 source/ap/vim/patches/7.3.629 create mode 100644 source/ap/vim/patches/7.3.630 create mode 100644 source/ap/vim/patches/7.3.631 create mode 100644 source/ap/vim/patches/7.3.632 create mode 100644 source/ap/vim/patches/7.3.633 create mode 100644 source/ap/vim/patches/7.3.634 create mode 100644 source/ap/vim/patches/7.3.635 create mode 100644 source/ap/vim/patches/7.3.636 create mode 100644 source/ap/vim/patches/7.3.637 create mode 100644 source/ap/vim/patches/7.3.638 create mode 100644 source/ap/vim/patches/7.3.639 create mode 100644 source/ap/vim/patches/7.3.640 create mode 100644 source/ap/vim/patches/7.3.641 create mode 100644 source/ap/vim/patches/7.3.642 create mode 100644 source/ap/vim/patches/7.3.643 create mode 100644 source/ap/vim/patches/7.3.644 create mode 100644 source/ap/vim/patches/7.3.645 (limited to 'source/ap/vim') diff --git a/source/ap/vim/patches/7.3.155 b/source/ap/vim/patches/7.3.155 new file mode 100644 index 000000000..806efca2b --- /dev/null +++ b/source/ap/vim/patches/7.3.155 @@ -0,0 +1,286 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.155 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.155 +Problem: Crash when using map(), filter() and remove() on v:. (ZyX) + Also for extend(). (Yukihiro Nakadaira) +Solution: Mark v: as locked. Also correct locking error messages. +Files: src/eval.c + + +*** ../vim-7.3.154/src/eval.c 2011-04-01 16:07:41.000000000 +0200 +--- src/eval.c 2011-04-11 13:28:34.000000000 +0200 +*************** +*** 853,858 **** +--- 853,859 ---- + + init_var_dict(&globvardict, &globvars_var); + init_var_dict(&vimvardict, &vimvars_var); ++ vimvardict.dv_lock = VAR_FIXED; + hash_init(&compat_hashtab); + hash_init(&func_hashtab); + +*************** +*** 8545,8551 **** + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"add()") + && list_append_tv(l, &argvars[1]) == OK) + copy_tv(&argvars[0], rettv); + } +--- 8546,8552 ---- + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_("add() argument")) + && list_append_tv(l, &argvars[1]) == OK) + copy_tv(&argvars[0], rettv); + } +*************** +*** 9946,9951 **** +--- 9947,9954 ---- + typval_T *argvars; + typval_T *rettv; + { ++ char *arg_errmsg = N_("extend() argument"); ++ + if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST) + { + list_T *l1, *l2; +*************** +*** 9955,9961 **** + + l1 = argvars[0].vval.v_list; + l2 = argvars[1].vval.v_list; +! if (l1 != NULL && !tv_check_lock(l1->lv_lock, (char_u *)"extend()") + && l2 != NULL) + { + if (argvars[2].v_type != VAR_UNKNOWN) +--- 9958,9964 ---- + + l1 = argvars[0].vval.v_list; + l2 = argvars[1].vval.v_list; +! if (l1 != NULL && !tv_check_lock(l1->lv_lock, (char_u *)_(arg_errmsg)) + && l2 != NULL) + { + if (argvars[2].v_type != VAR_UNKNOWN) +*************** +*** 9994,10000 **** + + d1 = argvars[0].vval.v_dict; + d2 = argvars[1].vval.v_dict; +! if (d1 != NULL && !tv_check_lock(d1->dv_lock, (char_u *)"extend()") + && d2 != NULL) + { + /* Check the third argument. */ +--- 9997,10003 ---- + + d1 = argvars[0].vval.v_dict; + d2 = argvars[1].vval.v_dict; +! if (d1 != NULL && !tv_check_lock(d1->dv_lock, (char_u *)_(arg_errmsg)) + && d2 != NULL) + { + /* Check the third argument. */ +*************** +*** 10236,10255 **** + typval_T save_key; + int rem; + int todo; +! char_u *ermsg = map ? (char_u *)"map()" : (char_u *)"filter()"; + int save_did_emsg; + int idx = 0; + + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) == NULL +! || (map && tv_check_lock(l->lv_lock, ermsg))) + return; + } + else if (argvars[0].v_type == VAR_DICT) + { + if ((d = argvars[0].vval.v_dict) == NULL +! || (map && tv_check_lock(d->dv_lock, ermsg))) + return; + } + else +--- 10239,10260 ---- + typval_T save_key; + int rem; + int todo; +! char_u *ermsg = (char_u *)(map ? "map()" : "filter()"); +! char *arg_errmsg = (map ? N_("map() argument") +! : N_("filter() argument")); + int save_did_emsg; + int idx = 0; + + if (argvars[0].v_type == VAR_LIST) + { + if ((l = argvars[0].vval.v_list) == NULL +! || tv_check_lock(l->lv_lock, (char_u *)_(arg_errmsg))) + return; + } + else if (argvars[0].v_type == VAR_DICT) + { + if ((d = argvars[0].vval.v_dict) == NULL +! || tv_check_lock(d->dv_lock, (char_u *)_(arg_errmsg))) + return; + } + else +*************** +*** 10286,10292 **** + { + --todo; + di = HI2DI(hi); +! if (tv_check_lock(di->di_tv.v_lock, ermsg)) + break; + vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); + if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL +--- 10291,10298 ---- + { + --todo; + di = HI2DI(hi); +! if (tv_check_lock(di->di_tv.v_lock, +! (char_u *)_(arg_errmsg))) + break; + vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); + if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL +*************** +*** 10305,10311 **** + + for (li = l->lv_first; li != NULL; li = nli) + { +! if (tv_check_lock(li->li_tv.v_lock, ermsg)) + break; + nli = li->li_next; + vimvars[VV_KEY].vv_nr = idx; +--- 10311,10317 ---- + + for (li = l->lv_first; li != NULL; li = nli) + { +! if (tv_check_lock(li->li_tv.v_lock, (char_u *)_(arg_errmsg))) + break; + nli = li->li_next; + vimvars[VV_KEY].vv_nr = idx; +*************** +*** 12910,12916 **** + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "insert()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"insert()")) + { + if (argvars[2].v_type != VAR_UNKNOWN) + before = get_tv_number_chk(&argvars[2], &error); +--- 12916,12922 ---- + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "insert()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_("insert() argument"))) + { + if (argvars[2].v_type != VAR_UNKNOWN) + before = get_tv_number_chk(&argvars[2], &error); +*************** +*** 14775,14787 **** + char_u *key; + dict_T *d; + dictitem_T *di; + + if (argvars[0].v_type == VAR_DICT) + { + if (argvars[2].v_type != VAR_UNKNOWN) + EMSG2(_(e_toomanyarg), "remove()"); + else if ((d = argvars[0].vval.v_dict) != NULL +! && !tv_check_lock(d->dv_lock, (char_u *)"remove() argument")) + { + key = get_tv_string_chk(&argvars[1]); + if (key != NULL) +--- 14781,14794 ---- + char_u *key; + dict_T *d; + dictitem_T *di; ++ char *arg_errmsg = N_("remove() argument"); + + if (argvars[0].v_type == VAR_DICT) + { + if (argvars[2].v_type != VAR_UNKNOWN) + EMSG2(_(e_toomanyarg), "remove()"); + else if ((d = argvars[0].vval.v_dict) != NULL +! && !tv_check_lock(d->dv_lock, (char_u *)_(arg_errmsg))) + { + key = get_tv_string_chk(&argvars[1]); + if (key != NULL) +*************** +*** 14801,14807 **** + else if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listdictarg), "remove()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"remove() argument")) + { + int error = FALSE; + +--- 14808,14814 ---- + else if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listdictarg), "remove()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_(arg_errmsg))) + { + int error = FALSE; + +*************** +*** 15135,15141 **** + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "reverse()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)"reverse()")) + { + li = l->lv_last; + l->lv_first = l->lv_last = NULL; +--- 15142,15148 ---- + if (argvars[0].v_type != VAR_LIST) + EMSG2(_(e_listarg), "reverse()"); + else if ((l = argvars[0].vval.v_list) != NULL +! && !tv_check_lock(l->lv_lock, (char_u *)_("reverse() argument"))) + { + li = l->lv_last; + l->lv_first = l->lv_last = NULL; +*************** +*** 16432,16438 **** + else + { + l = argvars[0].vval.v_list; +! if (l == NULL || tv_check_lock(l->lv_lock, (char_u *)"sort()")) + return; + rettv->vval.v_list = l; + rettv->v_type = VAR_LIST; +--- 16439,16446 ---- + else + { + l = argvars[0].vval.v_list; +! if (l == NULL || tv_check_lock(l->lv_lock, +! (char_u *)_("sort() argument"))) + return; + rettv->vval.v_list = l; + rettv->v_type = VAR_LIST; +*** ../vim-7.3.154/src/version.c 2011-04-02 15:12:45.000000000 +0200 +--- src/version.c 2011-04-11 13:13:38.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 155, + /**/ + +-- +I used to be indecisive, now I'm not sure. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.156 b/source/ap/vim/patches/7.3.156 new file mode 100644 index 000000000..ec873242e --- /dev/null +++ b/source/ap/vim/patches/7.3.156 @@ -0,0 +1,89 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.156 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.156 +Problem: Tty names possibly left unterminated. +Solution: Use vim_strncpy() instead of strncpy(). +Files: src/pty.c + + +*** ../vim-7.3.155/src/pty.c 2010-08-15 21:57:28.000000000 +0200 +--- src/pty.c 2011-04-11 14:02:49.000000000 +0200 +*************** +*** 209,216 **** + #ifdef _SEQUENT_ + fvhangup(s); + #endif +! strncpy(PtyName, m, sizeof(PtyName)); +! strncpy(TtyName, s, sizeof(TtyName)); + initmaster(f); + *ttyn = TtyName; + return f; +--- 209,216 ---- + #ifdef _SEQUENT_ + fvhangup(s); + #endif +! vim_strncpy((char_u *)PtyName, (char_u *)m, sizeof(PtyName) - 1); +! vim_strncpy((char_u *)TtyName, (char_u *)s, sizeof(TtyName) - 1); + initmaster(f); + *ttyn = TtyName; + return f; +*************** +*** 301,307 **** + return -1; + } + signal(SIGCHLD, sigcld); +! strncpy(TtyName, m, sizeof(TtyName)); + initmaster(f); + *ttyn = TtyName; + return f; +--- 301,307 ---- + return -1; + } + signal(SIGCHLD, sigcld); +! vim_strncpy((char_u *)TtyName, (char_u *)m, sizeof(TtyName) - 1); + initmaster(f); + *ttyn = TtyName; + return f; +*************** +*** 326,332 **** + /* a dumb looking loop replaced by mycrofts code: */ + if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) + return -1; +! strncpy(TtyName, ttyname(f), sizeof(TtyName)); + if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) + { + close(f); +--- 326,332 ---- + /* a dumb looking loop replaced by mycrofts code: */ + if ((f = open("/dev/ptc", O_RDWR | O_NOCTTY | O_EXTRA)) < 0) + return -1; +! vim_strncpy((char_u *)TtyName, (char_u *)ttyname(f), sizeof(TtyName) - 1); + if (geteuid() != ROOT_UID && mch_access(TtyName, R_OK | W_OK)) + { + close(f); +*** ../vim-7.3.155/src/version.c 2011-04-11 13:46:07.000000000 +0200 +--- src/version.c 2011-04-11 14:23:38.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 156, + /**/ + +-- +I think that you'll agree that engineers are very effective in their social +interactions. It's the "normal" people who are nuts. + (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 /// diff --git a/source/ap/vim/patches/7.3.157 b/source/ap/vim/patches/7.3.157 new file mode 100644 index 000000000..403c94865 --- /dev/null +++ b/source/ap/vim/patches/7.3.157 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.157 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.157 +Problem: Superfluous assignment. +Solution: Remove assignment. +Files: src/misc1.c + + +*** ../vim-7.3.156/src/misc1.c 2011-03-22 13:07:19.000000000 +0100 +--- src/misc1.c 2011-04-11 14:11:17.000000000 +0200 +*************** +*** 6773,6780 **** + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if ((trypos = find_match_paren(ind_maxparen, +! ind_maxcomment)) != NULL) + amount += ind_unclosed2; + else + amount += ind_unclosed; +--- 6775,6781 ---- + { + curwin->w_cursor.lnum = our_paren_pos.lnum; + curwin->w_cursor.col = col; +! if (find_match_paren(ind_maxparen, ind_maxcomment) != NULL) + amount += ind_unclosed2; + else + amount += ind_unclosed; +*** ../vim-7.3.156/src/version.c 2011-04-11 14:24:33.000000000 +0200 +--- src/version.c 2011-04-11 14:25:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 157, + /**/ + +-- +A radioactive cat has eighteen half-lives. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.158 b/source/ap/vim/patches/7.3.158 new file mode 100644 index 000000000..8fba3508b --- /dev/null +++ b/source/ap/vim/patches/7.3.158 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.158 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.158 +Problem: Might use uninitialized memory in C indenting. +Solution: Init arrays to empty. +Files: src/misc1.c + + +*** ../vim-7.3.157/src/misc1.c 2011-04-11 14:26:15.000000000 +0200 +--- src/misc1.c 2011-04-11 14:11:17.000000000 +0200 +*************** +*** 6433,6438 **** +--- 6433,6440 ---- + /* find how indented the line beginning the comment is */ + getvcol(curwin, trypos, &col, NULL, NULL); + amount = col; ++ *lead_start = NUL; ++ *lead_middle = NUL; + + p = curbuf->b_p_com; + while (*p != NUL) +*** ../vim-7.3.157/src/version.c 2011-04-11 14:26:15.000000000 +0200 +--- src/version.c 2011-04-11 14:27:05.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 158, + /**/ + +-- +It's totally unfair to suggest - as many have - that engineers are socially +inept. Engineers simply have different objectives when it comes to social +interaction. + (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 /// diff --git a/source/ap/vim/patches/7.3.159 b/source/ap/vim/patches/7.3.159 new file mode 100644 index 000000000..7029ac86c --- /dev/null +++ b/source/ap/vim/patches/7.3.159 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.159 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.159 +Problem: Using uninitialized pointer when out of memory. +Solution: Check for NULL return value. +Files: src/mbyte.c + + +*** ../vim-7.3.158/src/mbyte.c 2010-10-27 13:37:39.000000000 +0200 +--- src/mbyte.c 2011-04-11 14:17:39.000000000 +0200 +*************** +*** 4129,4135 **** + done = to - (char *)result; + } + +! if (resultlenp != NULL) + *resultlenp = (int)(to - (char *)result); + return result; + } +--- 4129,4135 ---- + done = to - (char *)result; + } + +! if (resultlenp != NULL && result != NULL) + *resultlenp = (int)(to - (char *)result); + return result; + } +*** ../vim-7.3.158/src/version.c 2011-04-11 14:27:34.000000000 +0200 +--- src/version.c 2011-04-11 14:28:08.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 159, + /**/ + +-- +I learned the customs and mannerisms of engineers by observing them, much the +way Jane Goodall learned about the great apes, but without the hassle of +grooming. + (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 /// diff --git a/source/ap/vim/patches/7.3.160 b/source/ap/vim/patches/7.3.160 new file mode 100644 index 000000000..bf3a069ff --- /dev/null +++ b/source/ap/vim/patches/7.3.160 @@ -0,0 +1,482 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.160 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.160 +Problem: Unsafe string copying. +Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead + of strcat(). +Files: src/buffer.c, src/ex_docmd.c, src/hardcopy.c, src/menu.c, + src/misc1.c, src/misc2.c, src/proto/misc2.pro, src/netbeans.c, + src/os_unix.c, src/spell.c, src/syntax.c, src/tag.c + +*** ../vim-7.3.159/src/buffer.c 2011-02-15 14:24:42.000000000 +0100 +--- src/buffer.c 2011-04-11 16:08:38.000000000 +0200 +*************** +*** 3176,3182 **** + /* format: "fname + (path) (1 of 2) - VIM" */ + + if (curbuf->b_fname == NULL) +! STRCPY(buf, _("[No Name]")); + else + { + p = transstr(gettail(curbuf->b_fname)); +--- 3176,3182 ---- + /* format: "fname + (path) (1 of 2) - VIM" */ + + if (curbuf->b_fname == NULL) +! vim_strncpy(buf, (char_u *)_("[No Name]"), IOSIZE - 100); + else + { + p = transstr(gettail(curbuf->b_fname)); +*************** +*** 3232,3238 **** + if (serverName != NULL) + { + STRCAT(buf, " - "); +! STRCAT(buf, serverName); + } + else + #endif +--- 3232,3238 ---- + if (serverName != NULL) + { + STRCAT(buf, " - "); +! vim_strcat(buf, serverName, IOSIZE); + } + else + #endif +*** ../vim-7.3.159/src/ex_docmd.c 2011-03-03 15:54:45.000000000 +0100 +--- src/ex_docmd.c 2011-04-11 15:43:48.000000000 +0200 +*************** +*** 5096,5102 **** + char_u buff[IOSIZE]; + + if (n == 1) +! STRCPY(buff, _("1 more file to edit. Quit anyway?")); + else + vim_snprintf((char *)buff, IOSIZE, + _("%d more files to edit. Quit anyway?"), n); +--- 5096,5104 ---- + char_u buff[IOSIZE]; + + if (n == 1) +! vim_strncpy(buff, +! (char_u *)_("1 more file to edit. Quit anyway?"), +! IOSIZE - 1); + else + vim_snprintf((char *)buff, IOSIZE, + _("%d more files to edit. Quit anyway?"), n); +*** ../vim-7.3.159/src/hardcopy.c 2010-08-15 21:57:25.000000000 +0200 +--- src/hardcopy.c 2011-04-11 15:30:09.000000000 +0200 +*************** +*** 1761,1772 **** + { + char_u buffer[MAXPATHL + 1]; + +! STRCPY(resource->name, name); + /* Look for named resource file in runtimepath */ + STRCPY(buffer, "print"); + add_pathsep(buffer); +! STRCAT(buffer, name); +! STRCAT(buffer, ".ps"); + resource->filename[0] = NUL; + return (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) +--- 1761,1772 ---- + { + char_u buffer[MAXPATHL + 1]; + +! vim_strncpy(resource->name, (char_u *)name, 63); + /* Look for named resource file in runtimepath */ + STRCPY(buffer, "print"); + add_pathsep(buffer); +! vim_strcat(buffer, (char_u *)name, MAXPATHL); +! vim_strcat(buffer, (char_u *)".ps", MAXPATHL); + resource->filename[0] = NUL; + return (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) +*** ../vim-7.3.159/src/menu.c 2011-01-04 17:49:25.000000000 +0100 +--- src/menu.c 2011-04-11 15:17:21.000000000 +0200 +*************** +*** 1394,1400 **** + int idx; + { + static vimmenu_T *menu = NULL; +! static char_u tbuffer[256]; /*hack*/ + char_u *str; + #ifdef FEAT_MULTI_LANG + static int should_advance = FALSE; +--- 1394,1401 ---- + int idx; + { + static vimmenu_T *menu = NULL; +! #define TBUFFER_LEN 256 +! static char_u tbuffer[TBUFFER_LEN]; /*hack*/ + char_u *str; + #ifdef FEAT_MULTI_LANG + static int should_advance = FALSE; +*************** +*** 1428,1438 **** + { + #ifdef FEAT_MULTI_LANG + if (should_advance) +! STRCPY(tbuffer, menu->en_dname); + else + { + #endif +! STRCPY(tbuffer, menu->dname); + #ifdef FEAT_MULTI_LANG + if (menu->en_dname == NULL) + should_advance = TRUE; +--- 1429,1439 ---- + { + #ifdef FEAT_MULTI_LANG + if (should_advance) +! vim_strncpy(tbuffer, menu->en_dname, TBUFFER_LEN - 2); + else + { + #endif +! vim_strncpy(tbuffer, menu->dname, TBUFFER_LEN - 2); + #ifdef FEAT_MULTI_LANG + if (menu->en_dname == NULL) + should_advance = TRUE; +*** ../vim-7.3.159/src/misc1.c 2011-04-11 14:27:34.000000000 +0200 +--- src/misc1.c 2011-04-11 16:03:22.000000000 +0200 +*************** +*** 3332,3350 **** + if (pn == 1) + { + if (n > 0) +! STRCPY(msg_buf, _("1 more line")); + else +! STRCPY(msg_buf, _("1 line less")); + } + else + { + if (n > 0) +! sprintf((char *)msg_buf, _("%ld more lines"), pn); + else +! sprintf((char *)msg_buf, _("%ld fewer lines"), pn); + } + if (got_int) +! STRCAT(msg_buf, _(" (Interrupted)")); + if (msg(msg_buf)) + { + set_keep_msg(msg_buf, 0); +--- 3332,3354 ---- + if (pn == 1) + { + if (n > 0) +! vim_strncpy(msg_buf, (char_u *)_("1 more line"), +! MSG_BUF_LEN - 1); + else +! vim_strncpy(msg_buf, (char_u *)_("1 line less"), +! MSG_BUF_LEN - 1); + } + else + { + if (n > 0) +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! _("%ld more lines"), pn); + else +! vim_snprintf((char *)msg_buf, MSG_BUF_LEN, +! _("%ld fewer lines"), pn); + } + if (got_int) +! vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN); + if (msg(msg_buf)) + { + set_keep_msg(msg_buf, 0); +*** ../vim-7.3.159/src/misc2.c 2010-12-08 13:11:15.000000000 +0100 +--- src/misc2.c 2011-04-11 15:30:20.000000000 +0200 +*************** +*** 1647,1652 **** +--- 1647,1674 ---- + } + + /* ++ * Like strcat(), but make sure the result fits in "tosize" bytes and is ++ * always NUL terminated. ++ */ ++ void ++ vim_strcat(to, from, tosize) ++ char_u *to; ++ char_u *from; ++ size_t tosize; ++ { ++ size_t tolen = STRLEN(to); ++ size_t fromlen = STRLEN(from); ++ ++ if (tolen + fromlen + 1 > tosize) ++ { ++ mch_memmove(to + tolen, from, tosize - tolen - 1); ++ to[tosize - 1] = NUL; ++ } ++ else ++ STRCPY(to + tolen, from); ++ } ++ ++ /* + * Isolate one part of a string option where parts are separated with + * "sep_chars". + * The part is copied into "buf[maxlen]". +*** ../vim-7.3.159/src/proto/misc2.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/misc2.pro 2011-04-11 15:29:55.000000000 +0200 +*************** +*** 40,45 **** +--- 40,46 ---- + void copy_chars __ARGS((char_u *ptr, size_t count, int c)); + void del_trailing_spaces __ARGS((char_u *ptr)); + void vim_strncpy __ARGS((char_u *to, char_u *from, size_t len)); ++ void vim_strcat __ARGS((char_u *to, char_u *from, size_t tosize)); + int copy_option_part __ARGS((char_u **option, char_u *buf, int maxlen, char *sep_chars)); + void vim_free __ARGS((void *x)); + int vim_stricmp __ARGS((char *s1, char *s2)); +*** ../vim-7.3.159/src/netbeans.c 2011-04-01 15:33:54.000000000 +0200 +--- src/netbeans.c 2011-04-11 16:02:51.000000000 +0200 +*************** +*** 3914,3927 **** + } + else + { +! char_u ebuf[BUFSIZ]; + +! STRCPY(ebuf, (char_u *)_("E505: ")); +! STRCAT(ebuf, IObuff); +! STRCAT(ebuf, (char_u *)_("is read-only (add ! to override)")); +! STRCPY(IObuff, ebuf); +! nbdebug((" %s\n", ebuf )); +! emsg(IObuff); + } + } + +--- 3914,3925 ---- + } + else + { +! char_u msgbuf[IOSIZE]; + +! vim_snprintf((char *)msgbuf, IOSIZE, +! _("E505: %s is read-only (add ! to override)"), IObuff); +! nbdebug((" %s\n", msgbuf)); +! emsg(msgbuf); + } + } + +*** ../vim-7.3.159/src/os_unix.c 2011-02-15 17:39:14.000000000 +0100 +--- src/os_unix.c 2011-04-11 16:39:11.000000000 +0200 +*************** +*** 5725,5730 **** +--- 5725,5731 ---- + if (shell_style == STYLE_PRINT && !did_find_nul) + { + /* If there is a NUL, set did_find_nul, else set check_spaces */ ++ buffer[len] = NUL; + if (len && (int)STRLEN(buffer) < (int)len - 1) + did_find_nul = TRUE; + else +*************** +*** 6594,6600 **** + xterm_hints.x = 2; + return TRUE; + } +! if (mouse_code == NULL) + { + xterm_trace = 0; + return FALSE; +--- 6595,6601 ---- + xterm_hints.x = 2; + return TRUE; + } +! if (mouse_code == NULL || STRLEN(mouse_code) > 45) + { + xterm_trace = 0; + return FALSE; +*** ../vim-7.3.159/src/spell.c 2011-02-01 13:59:44.000000000 +0100 +--- src/spell.c 2011-04-11 15:50:40.000000000 +0200 +*************** +*** 6957,6963 **** + if (ae->ae_add == NULL) + *newword = NUL; + else +! STRCPY(newword, ae->ae_add); + p = word; + if (ae->ae_chop != NULL) + { +--- 6957,6963 ---- + if (ae->ae_add == NULL) + *newword = NUL; + else +! vim_strncpy(newword, ae->ae_add, MAXWLEN - 1); + p = word; + if (ae->ae_chop != NULL) + { +*************** +*** 6978,6984 **** + else + { + /* suffix: chop/add at the end of the word */ +! STRCPY(newword, word); + if (ae->ae_chop != NULL) + { + /* Remove chop string. */ +--- 6978,6984 ---- + else + { + /* suffix: chop/add at the end of the word */ +! vim_strncpy(newword, word, MAXWLEN - 1); + if (ae->ae_chop != NULL) + { + /* Remove chop string. */ +*************** +*** 8654,8660 **** + * Write the .sug file. + * Make the file name by changing ".spl" to ".sug". + */ +! STRCPY(fname, wfname); + len = (int)STRLEN(fname); + fname[len - 2] = 'u'; + fname[len - 1] = 'g'; +--- 8654,8660 ---- + * Write the .sug file. + * Make the file name by changing ".spl" to ".sug". + */ +! vim_strncpy(fname, wfname, MAXPATHL - 1); + len = (int)STRLEN(fname); + fname[len - 2] = 'u'; + fname[len - 1] = 'g'; +*************** +*** 10261,10267 **** + + /* The suggested word may replace only part of the bad word, add + * the not replaced part. */ +! STRCPY(wcopy, stp->st_word); + if (sug.su_badlen > stp->st_orglen) + vim_strncpy(wcopy + stp->st_wordlen, + sug.su_badptr + stp->st_orglen, +--- 10261,10267 ---- + + /* The suggested word may replace only part of the bad word, add + * the not replaced part. */ +! vim_strncpy(wcopy, stp->st_word, MAXWLEN); + if (sug.su_badlen > stp->st_orglen) + vim_strncpy(wcopy + stp->st_wordlen, + sug.su_badptr + stp->st_orglen, +*************** +*** 13162,13168 **** + pbad = badsound2; + } + +! if (lendiff > 0) + { + /* Add part of the bad word to the good word, so that we soundfold + * what replaces the bad word. */ +--- 13162,13168 ---- + pbad = badsound2; + } + +! if (lendiff > 0 && stp->st_wordlen + lendiff < MAXWLEN) + { + /* Add part of the bad word to the good word, so that we soundfold + * what replaces the bad word. */ +*************** +*** 13875,13881 **** + for (i = gap->ga_len - 1; i >= 0; --i) + { + /* Need to append what follows to check for "the the". */ +! STRCPY(longword, stp[i].st_word); + len = stp[i].st_wordlen; + vim_strncpy(longword + len, su->su_badptr + stp[i].st_orglen, + MAXWLEN - len); +--- 13875,13881 ---- + for (i = gap->ga_len - 1; i >= 0; --i) + { + /* Need to append what follows to check for "the the". */ +! vim_strncpy(longword, stp[i].st_word, MAXWLEN); + len = stp[i].st_wordlen; + vim_strncpy(longword + len, su->su_badptr + stp[i].st_orglen, + MAXWLEN - len); +*************** +*** 14221,14227 **** + *t = NUL; + } + else +! STRCPY(word, s); + + smp = (salitem_T *)slang->sl_sal.ga_data; + +--- 14221,14227 ---- + *t = NUL; + } + else +! vim_strncpy(word, s, MAXWLEN - 1); + + smp = (salitem_T *)slang->sl_sal.ga_data; + +*** ../vim-7.3.159/src/syntax.c 2011-04-02 15:12:45.000000000 +0200 +--- src/syntax.c 2011-04-11 15:44:30.000000000 +0200 +*************** +*** 8576,8583 **** + if (iarg & hl_attr_table[i]) + { + if (buf[0] != NUL) +! STRCAT(buf, ","); +! STRCAT(buf, hl_name_table[i]); + iarg &= ~hl_attr_table[i]; /* don't want "inverse" */ + } + } +--- 8576,8583 ---- + if (iarg & hl_attr_table[i]) + { + if (buf[0] != NUL) +! vim_strcat(buf, (char_u *)",", 100); +! vim_strcat(buf, (char_u *)hl_name_table[i], 100); + iarg &= ~hl_attr_table[i]; /* don't want "inverse" */ + } + } +*** ../vim-7.3.159/src/tag.c 2011-02-25 15:13:43.000000000 +0100 +--- src/tag.c 2011-04-11 15:34:59.000000000 +0200 +*************** +*** 806,812 **** + p = tag_full_fname(&tagp); + if (p == NULL) + continue; +! STRCPY(fname, p); + vim_free(p); + + /* +--- 806,812 ---- + p = tag_full_fname(&tagp); + if (p == NULL) + continue; +! vim_strncpy(fname, p, MAXPATHL); + vim_free(p); + + /* +*** ../vim-7.3.159/src/version.c 2011-04-11 14:29:13.000000000 +0200 +--- src/version.c 2011-04-11 16:50:53.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 160, + /**/ + +-- +If someone questions your market projections, simply point out that your +target market is "People who are nuts" and "People who will buy any damn +thing". Nobody is going to tell you there aren't enough of those people +to go around. + (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 /// diff --git a/source/ap/vim/patches/7.3.161 b/source/ap/vim/patches/7.3.161 new file mode 100644 index 000000000..61223ec2b --- /dev/null +++ b/source/ap/vim/patches/7.3.161 @@ -0,0 +1,1645 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.161 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.161 +Problem: Items on the stack may be too big. +Solution: Make items static or allocate them. +Files: src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, + src/fileio.c, src/hardcopy.c, src/quickfix.c, src/main.c, + src/netbeans.c, src/spell.c, src/tag.c, src/vim.h, src/xxd/xxd.c + + +*** ../vim-7.3.160/src/eval.c 2011-04-11 13:46:07.000000000 +0200 +--- src/eval.c 2011-04-11 21:05:50.000000000 +0200 +*************** +*** 11100,11117 **** + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u cwd[MAXPATHL]; + + rettv->v_type = VAR_STRING; +! if (mch_dirname(cwd, MAXPATHL) == FAIL) +! rettv->vval.v_string = NULL; +! else + { +! rettv->vval.v_string = vim_strsave(cwd); + #ifdef BACKSLASH_IN_FILENAME +! if (rettv->vval.v_string != NULL) +! slash_adjust(rettv->vval.v_string); + #endif + } + } + +--- 11100,11121 ---- + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u *cwd; + + rettv->v_type = VAR_STRING; +! rettv->vval.v_string = NULL; +! cwd = alloc(MAXPATHL); +! if (cwd != NULL) + { +! if (mch_dirname(cwd, MAXPATHL) != FAIL) +! { +! rettv->vval.v_string = vim_strsave(cwd); + #ifdef BACKSLASH_IN_FILENAME +! if (rettv->vval.v_string != NULL) +! slash_adjust(rettv->vval.v_string); + #endif ++ } ++ vim_free(cwd); + } + } + +*************** +*** 14938,14943 **** +--- 14942,14950 ---- + typval_T *rettv; + { + char_u *p; ++ #ifdef HAVE_READLINK ++ char_u *buf = NULL; ++ #endif + + p = get_tv_string(&argvars[0]); + #ifdef FEAT_SHORTCUT +*************** +*** 14953,14959 **** + #else + # ifdef HAVE_READLINK + { +- char_u buf[MAXPATHL + 1]; + char_u *cpy; + int len; + char_u *remain = NULL; +--- 14960,14965 ---- +*************** +*** 14981,14986 **** +--- 14987,14996 ---- + q[-1] = NUL; + } + ++ buf = alloc(MAXPATHL + 1); ++ if (buf == NULL) ++ goto fail; ++ + for (;;) + { + for (;;) +*************** +*** 15124,15129 **** +--- 15134,15140 ---- + + #ifdef HAVE_READLINK + fail: ++ vim_free(buf); + #endif + rettv->v_type = VAR_STRING; + } +*************** +*** 17604,17621 **** + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u fname[MAXPATHL + 1]; + tagname_T tn; + int first; + + if (rettv_list_alloc(rettv) == FAIL) + return; + + for (first = TRUE; ; first = FALSE) + if (get_tagfname(&tn, first, fname) == FAIL + || list_append_string(rettv->vval.v_list, fname, -1) == FAIL) + break; + tagname_free(&tn); + } + + /* +--- 17615,17636 ---- + typval_T *argvars UNUSED; + typval_T *rettv; + { +! char_u *fname; + tagname_T tn; + int first; + + if (rettv_list_alloc(rettv) == FAIL) + return; ++ fname = alloc(MAXPATHL); ++ if (fname == NULL) ++ return; + + for (first = TRUE; ; first = FALSE) + if (get_tagfname(&tn, first, fname) == FAIL + || list_append_string(rettv->vval.v_list, fname, -1) == FAIL) + break; + tagname_free(&tn); ++ vim_free(fname); + } + + /* +*** ../vim-7.3.160/src/ex_cmds.c 2011-02-01 13:48:47.000000000 +0100 +--- src/ex_cmds.c 2011-04-11 20:51:34.000000000 +0200 +*************** +*** 2777,2783 **** + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[IOSIZE]; + + dialog_msg(buff, _("Overwrite existing file \"%s\"?"), fname); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) != VIM_YES) +--- 2777,2783 ---- + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[DIALOG_MSG_SIZE]; + + dialog_msg(buff, _("Overwrite existing file \"%s\"?"), fname); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) != VIM_YES) +*************** +*** 2795,2801 **** + /* For ":w! filename" check that no swap file exists for "filename". */ + if (other && !emsg_silent) + { +! char_u dir[MAXPATHL]; + char_u *p; + int r; + char_u *swapname; +--- 2795,2801 ---- + /* For ":w! filename" check that no swap file exists for "filename". */ + if (other && !emsg_silent) + { +! char_u *dir; + char_u *p; + int r; + char_u *swapname; +*************** +*** 2806,2825 **** + * Use 'shortname' of the current buffer, since there is no buffer + * for the written file. */ + if (*p_dir == NUL) + STRCPY(dir, "."); + else + { + p = p_dir; + copy_option_part(&p, dir, MAXPATHL, ","); + } + swapname = makeswapname(fname, ffname, curbuf, dir); + r = vim_fexists(swapname); + if (r) + { + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[IOSIZE]; + + dialog_msg(buff, + _("Swap file \"%s\" exists, overwrite anyway?"), +--- 2806,2834 ---- + * Use 'shortname' of the current buffer, since there is no buffer + * for the written file. */ + if (*p_dir == NUL) ++ { ++ dir = alloc(5); ++ if (dir == NULL) ++ return FAIL; + STRCPY(dir, "."); ++ } + else + { ++ dir = alloc(MAXPATHL); ++ if (dir == NULL) ++ return FAIL; + p = p_dir; + copy_option_part(&p, dir, MAXPATHL, ","); + } + swapname = makeswapname(fname, ffname, curbuf, dir); ++ vim_free(dir); + r = vim_fexists(swapname); + if (r) + { + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if (p_confirm || cmdmod.confirm) + { +! char_u buff[DIALOG_MSG_SIZE]; + + dialog_msg(buff, + _("Swap file \"%s\" exists, overwrite anyway?"), +*************** +*** 2969,2975 **** + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) + { +! char_u buff[IOSIZE]; + + if (buf->b_p_ro) + dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"), +--- 2978,2984 ---- + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && buf->b_fname != NULL) + { +! char_u buff[DIALOG_MSG_SIZE]; + + if (buf->b_p_ro) + dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"), +*** ../vim-7.3.160/src/ex_cmds2.c 2011-02-25 14:46:06.000000000 +0100 +--- src/ex_cmds2.c 2011-04-11 20:51:40.000000000 +0200 +*************** +*** 1492,1498 **** + buf_T *buf; + int checkall; /* may abandon all changed buffers */ + { +! char_u buff[IOSIZE]; + int ret; + buf_T *buf2; + +--- 1492,1498 ---- + buf_T *buf; + int checkall; /* may abandon all changed buffers */ + { +! char_u buff[DIALOG_MSG_SIZE]; + int ret; + buf_T *buf2; + +*** ../vim-7.3.160/src/ex_docmd.c 2011-04-11 16:56:29.000000000 +0200 +--- src/ex_docmd.c 2011-04-11 21:20:35.000000000 +0200 +*************** +*** 5093,5106 **** + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && curbuf->b_fname != NULL) + { +! char_u buff[IOSIZE]; + + if (n == 1) + vim_strncpy(buff, + (char_u *)_("1 more file to edit. Quit anyway?"), +! IOSIZE - 1); + else +! vim_snprintf((char *)buff, IOSIZE, + _("%d more files to edit. Quit anyway?"), n); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) + return OK; +--- 5093,5106 ---- + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) + if ((p_confirm || cmdmod.confirm) && curbuf->b_fname != NULL) + { +! char_u buff[DIALOG_MSG_SIZE]; + + if (n == 1) + vim_strncpy(buff, + (char_u *)_("1 more file to edit. Quit anyway?"), +! DIALOG_MSG_SIZE - 1); + else +! vim_snprintf((char *)buff, DIALOG_MSG_SIZE, + _("%d more files to edit. Quit anyway?"), n); + if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) + return OK; +*************** +*** 8926,8960 **** + failed = TRUE; + if (eap->cmdidx == CMD_mksession) + { +! char_u dirnow[MAXPATHL]; /* current directory */ + +! /* +! * Change to session file's dir. +! */ +! if (mch_dirname(dirnow, MAXPATHL) == FAIL +! || mch_chdir((char *)dirnow) != 0) +! *dirnow = NUL; +! if (*dirnow != NUL && (ssop_flags & SSOP_SESDIR)) +! { +! if (vim_chdirfile(fname) == OK) +! shorten_fnames(TRUE); +! } +! else if (*dirnow != NUL +! && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) + { +! if (mch_chdir((char *)globaldir) == 0) +! shorten_fnames(TRUE); +! } + +! failed |= (makeopens(fd, dirnow) == FAIL); + +! /* restore original dir */ +! if (*dirnow != NUL && ((ssop_flags & SSOP_SESDIR) + || ((ssop_flags & SSOP_CURDIR) && globaldir != NULL))) +! { +! if (mch_chdir((char *)dirnow) != 0) +! EMSG(_(e_prev_dir)); +! shorten_fnames(TRUE); + } + } + else +--- 8926,8967 ---- + failed = TRUE; + if (eap->cmdidx == CMD_mksession) + { +! char_u *dirnow; /* current directory */ + +! dirnow = alloc(MAXPATHL); +! if (dirnow == NULL) +! failed = TRUE; +! else + { +! /* +! * Change to session file's dir. +! */ +! if (mch_dirname(dirnow, MAXPATHL) == FAIL +! || mch_chdir((char *)dirnow) != 0) +! *dirnow = NUL; +! if (*dirnow != NUL && (ssop_flags & SSOP_SESDIR)) +! { +! if (vim_chdirfile(fname) == OK) +! shorten_fnames(TRUE); +! } +! else if (*dirnow != NUL +! && (ssop_flags & SSOP_CURDIR) && globaldir != NULL) +! { +! if (mch_chdir((char *)globaldir) == 0) +! shorten_fnames(TRUE); +! } + +! failed |= (makeopens(fd, dirnow) == FAIL); + +! /* restore original dir */ +! if (*dirnow != NUL && ((ssop_flags & SSOP_SESDIR) + || ((ssop_flags & SSOP_CURDIR) && globaldir != NULL))) +! { +! if (mch_chdir((char *)dirnow) != 0) +! EMSG(_(e_prev_dir)); +! shorten_fnames(TRUE); +! } +! vim_free(dirnow); + } + } + else +*************** +*** 8985,8994 **** + else if (eap->cmdidx == CMD_mksession) + { + /* successful session write - set this_session var */ +! char_u tbuf[MAXPATHL]; + +! if (vim_FullName(fname, tbuf, MAXPATHL, FALSE) == OK) +! set_vim_var_string(VV_THIS_SESSION, tbuf, -1); + } + #endif + #ifdef MKSESSION_NL +--- 8992,9006 ---- + else if (eap->cmdidx == CMD_mksession) + { + /* successful session write - set this_session var */ +! char_u *tbuf; + +! tbuf = alloc(MAXPATHL); +! if (tbuf != NULL) +! { +! if (vim_FullName(fname, tbuf, MAXPATHL, FALSE) == OK) +! set_vim_var_string(VV_THIS_SESSION, tbuf, -1); +! vim_free(tbuf); +! } + } + #endif + #ifdef MKSESSION_NL +*************** +*** 10677,10683 **** + unsigned *flagp; + { + int i; +! char_u buf[MAXPATHL]; + char_u *s; + + if (gap->ga_len == 0) +--- 10689,10695 ---- + unsigned *flagp; + { + int i; +! char_u *buf = NULL; + char_u *s; + + if (gap->ga_len == 0) +*************** +*** 10692,10702 **** + { + if (fullname) + { +! (void)vim_FullName(s, buf, MAXPATHL, FALSE); +! s = buf; + } + if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL) + return FAIL; + } + } + return put_eol(fd); +--- 10704,10722 ---- + { + if (fullname) + { +! buf = alloc(MAXPATHL); +! if (buf != NULL) +! { +! (void)vim_FullName(s, buf, MAXPATHL, FALSE); +! s = buf; +! } + } + if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL) ++ { ++ vim_free(buf); + return FAIL; ++ } ++ vim_free(buf); + } + } + return put_eol(fd); +*************** +*** 10925,10931 **** + + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) || defined(PROTO) + /* +! * Make a dialog message in "buff[IOSIZE]". + * "format" must contain "%s". + */ + void +--- 10945,10951 ---- + + #if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) || defined(PROTO) + /* +! * Make a dialog message in "buff[DIALOG_MSG_SIZE]". + * "format" must contain "%s". + */ + void +*************** +*** 10936,10942 **** + { + if (fname == NULL) + fname = (char_u *)_("Untitled"); +! vim_snprintf((char *)buff, IOSIZE, format, fname); + } + #endif + +--- 10956,10962 ---- + { + if (fname == NULL) + fname = (char_u *)_("Untitled"); +! vim_snprintf((char *)buff, DIALOG_MSG_SIZE, format, fname); + } + #endif + +*** ../vim-7.3.160/src/fileio.c 2011-02-25 16:52:13.000000000 +0100 +--- src/fileio.c 2011-04-11 18:35:10.000000000 +0200 +*************** +*** 6023,6037 **** + shorten_fname1(full_path) + char_u *full_path; + { +! char_u dirname[MAXPATHL]; + char_u *p = full_path; + + if (mch_dirname(dirname, MAXPATHL) == OK) + { + p = shorten_fname(full_path, dirname); + if (p == NULL || *p == NUL) + p = full_path; + } + return p; + } + #endif +--- 6023,6041 ---- + shorten_fname1(full_path) + char_u *full_path; + { +! char_u *dirname; + char_u *p = full_path; + ++ dirname = alloc(MAXPATHL); ++ if (dirname == NULL) ++ return full_path; + if (mch_dirname(dirname, MAXPATHL) == OK) + { + p = shorten_fname(full_path, dirname); + if (p == NULL || *p == NUL) + p = full_path; + } ++ vim_free(dirname); + return p; + } + #endif +*** ../vim-7.3.160/src/hardcopy.c 2011-04-11 16:56:29.000000000 +0200 +--- src/hardcopy.c 2011-04-11 18:23:38.000000000 +0200 +*************** +*** 1759,1765 **** + char *name; + struct prt_ps_resource_S *resource; + { +! char_u buffer[MAXPATHL + 1]; + + vim_strncpy(resource->name, (char_u *)name, 63); + /* Look for named resource file in runtimepath */ +--- 1759,1770 ---- + char *name; + struct prt_ps_resource_S *resource; + { +! char_u *buffer; +! int retval; +! +! buffer = alloc(MAXPATHL + 1); +! if (buffer == NULL) +! return FALSE; + + vim_strncpy(resource->name, (char_u *)name, 63); + /* Look for named resource file in runtimepath */ +*************** +*** 1768,1776 **** + vim_strcat(buffer, (char_u *)name, MAXPATHL); + vim_strcat(buffer, (char_u *)".ps", MAXPATHL); + resource->filename[0] = NUL; +! return (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) + && resource->filename[0] != NUL); + } + + /* PS CR and LF characters have platform independent values */ +--- 1773,1783 ---- + vim_strcat(buffer, (char_u *)name, MAXPATHL); + vim_strcat(buffer, (char_u *)".ps", MAXPATHL); + resource->filename[0] = NUL; +! retval = (do_in_runtimepath(buffer, FALSE, prt_resource_name, + resource->filename) + && resource->filename[0] != NUL); ++ vim_free(buffer); ++ return retval; + } + + /* PS CR and LF characters have platform independent values */ +*************** +*** 2848,2862 **** + double right; + double top; + double bottom; +! struct prt_ps_resource_S res_prolog; +! struct prt_ps_resource_S res_encoding; + char buffer[256]; + char_u *p_encoding; + char_u *p; + #ifdef FEAT_MBYTE +! struct prt_ps_resource_S res_cidfont; +! struct prt_ps_resource_S res_cmap; + #endif + + /* + * PS DSC Header comments - no PS code! +--- 2855,2887 ---- + double right; + double top; + double bottom; +! struct prt_ps_resource_S *res_prolog; +! struct prt_ps_resource_S *res_encoding; + char buffer[256]; + char_u *p_encoding; + char_u *p; + #ifdef FEAT_MBYTE +! struct prt_ps_resource_S *res_cidfont; +! struct prt_ps_resource_S *res_cmap; + #endif ++ int retval = FALSE; ++ ++ res_prolog = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ res_encoding = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ #ifdef FEAT_MBYTE ++ res_cidfont = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ res_cmap = (struct prt_ps_resource_S *) ++ alloc(sizeof(struct prt_ps_resource_S)); ++ #endif ++ if (res_prolog == NULL || res_encoding == NULL ++ #ifdef FEAT_MBYTE ++ || res_cidfont == NULL || res_cmap == NULL ++ #endif ++ ) ++ goto theend; + + /* + * PS DSC Header comments - no PS code! +*************** +*** 2932,2958 **** + #endif + + /* Search for external resources VIM supplies */ +! if (!prt_find_resource("prolog", &res_prolog)) + { + EMSG(_("E456: Can't find PostScript resource file \"prolog.ps\"")); + return FALSE; + } +! if (!prt_open_resource(&res_prolog)) + return FALSE; +! if (!prt_check_resource(&res_prolog, PRT_PROLOG_VERSION)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Look for required version of multi-byte printing procset */ +! if (!prt_find_resource("cidfont", &res_cidfont)) + { + EMSG(_("E456: Can't find PostScript resource file \"cidfont.ps\"")); + return FALSE; + } +! if (!prt_open_resource(&res_cidfont)) + return FALSE; +! if (!prt_check_resource(&res_cidfont, PRT_CID_PROLOG_VERSION)) + return FALSE; + } + #endif +--- 2957,2983 ---- + #endif + + /* Search for external resources VIM supplies */ +! if (!prt_find_resource("prolog", res_prolog)) + { + EMSG(_("E456: Can't find PostScript resource file \"prolog.ps\"")); + return FALSE; + } +! if (!prt_open_resource(res_prolog)) + return FALSE; +! if (!prt_check_resource(res_prolog, PRT_PROLOG_VERSION)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Look for required version of multi-byte printing procset */ +! if (!prt_find_resource("cidfont", res_cidfont)) + { + EMSG(_("E456: Can't find PostScript resource file \"cidfont.ps\"")); + return FALSE; + } +! if (!prt_open_resource(res_cidfont)) + return FALSE; +! if (!prt_check_resource(res_cidfont, PRT_CID_PROLOG_VERSION)) + return FALSE; + } + #endif +*************** +*** 2968,2974 **** + #endif + p_encoding = enc_skip(p_penc); + if (*p_encoding == NUL +! || !prt_find_resource((char *)p_encoding, &res_encoding)) + { + /* 'printencoding' not set or not supported - find alternate */ + #ifdef FEAT_MBYTE +--- 2993,2999 ---- + #endif + p_encoding = enc_skip(p_penc); + if (*p_encoding == NUL +! || !prt_find_resource((char *)p_encoding, res_encoding)) + { + /* 'printencoding' not set or not supported - find alternate */ + #ifdef FEAT_MBYTE +*************** +*** 2977,2989 **** + p_encoding = enc_skip(p_enc); + props = enc_canon_props(p_encoding); + if (!(props & ENC_8BIT) +! || !prt_find_resource((char *)p_encoding, &res_encoding)) + /* 8-bit 'encoding' is not supported */ + #endif + { + /* Use latin1 as default printing encoding */ + p_encoding = (char_u *)"latin1"; +! if (!prt_find_resource((char *)p_encoding, &res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + p_encoding); +--- 3002,3014 ---- + p_encoding = enc_skip(p_enc); + props = enc_canon_props(p_encoding); + if (!(props & ENC_8BIT) +! || !prt_find_resource((char *)p_encoding, res_encoding)) + /* 8-bit 'encoding' is not supported */ + #endif + { + /* Use latin1 as default printing encoding */ + p_encoding = (char_u *)"latin1"; +! if (!prt_find_resource((char *)p_encoding, res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + p_encoding); +*************** +*** 2991,2997 **** + } + } + } +! if (!prt_open_resource(&res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +--- 3016,3022 ---- + } + } + } +! if (!prt_open_resource(res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +*************** +*** 3005,3017 **** + if (prt_use_courier) + { + /* Include ASCII range encoding vector */ +! if (!prt_find_resource(prt_ascii_encoding, &res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_ascii_encoding); + return FALSE; + } +! if (!prt_open_resource(&res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +--- 3030,3042 ---- + if (prt_use_courier) + { + /* Include ASCII range encoding vector */ +! if (!prt_find_resource(prt_ascii_encoding, res_encoding)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_ascii_encoding); + return FALSE; + } +! if (!prt_open_resource(res_encoding)) + return FALSE; + /* For the moment there are no checks on encoding resource files to + * perform */ +*************** +*** 3034,3077 **** + if (prt_out_mbyte && prt_custom_cmap) + { + /* Find user supplied CMap */ +! if (!prt_find_resource(prt_cmap, &res_cmap)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_cmap); + return FALSE; + } +! if (!prt_open_resource(&res_cmap)) + return FALSE; + } + #endif + + /* List resources supplied */ +! STRCPY(buffer, res_prolog.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_prolog.version); + prt_dsc_resources("DocumentSuppliedResources", "procset", buffer); + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { +! STRCPY(buffer, res_cidfont.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cidfont.version); + prt_dsc_resources(NULL, "procset", buffer); + + if (prt_custom_cmap) + { +! STRCPY(buffer, res_cmap.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cmap.version); + prt_dsc_resources(NULL, "cmap", buffer); + } + } + if (!prt_out_mbyte || prt_use_courier) + #endif + { +! STRCPY(buffer, res_encoding.title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_encoding.version); + prt_dsc_resources(NULL, "encoding", buffer); + } + prt_dsc_requirements(prt_duplex, prt_tumble, prt_collate, +--- 3059,3102 ---- + if (prt_out_mbyte && prt_custom_cmap) + { + /* Find user supplied CMap */ +! if (!prt_find_resource(prt_cmap, res_cmap)) + { + EMSG2(_("E456: Can't find PostScript resource file \"%s.ps\""), + prt_cmap); + return FALSE; + } +! if (!prt_open_resource(res_cmap)) + return FALSE; + } + #endif + + /* List resources supplied */ +! STRCPY(buffer, res_prolog->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_prolog->version); + prt_dsc_resources("DocumentSuppliedResources", "procset", buffer); + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { +! STRCPY(buffer, res_cidfont->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cidfont->version); + prt_dsc_resources(NULL, "procset", buffer); + + if (prt_custom_cmap) + { +! STRCPY(buffer, res_cmap->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_cmap->version); + prt_dsc_resources(NULL, "cmap", buffer); + } + } + if (!prt_out_mbyte || prt_use_courier) + #endif + { +! STRCPY(buffer, res_encoding->title); + STRCAT(buffer, " "); +! STRCAT(buffer, res_encoding->version); + prt_dsc_resources(NULL, "encoding", buffer); + } + prt_dsc_requirements(prt_duplex, prt_tumble, prt_collate, +*************** +*** 3114,3128 **** + prt_dsc_noarg("BeginProlog"); + + /* Add required procsets - NOTE: order is important! */ +! if (!prt_add_resource(&res_prolog)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Add CID font procset, and any user supplied CMap */ +! if (!prt_add_resource(&res_cidfont)) + return FALSE; +! if (prt_custom_cmap && !prt_add_resource(&res_cmap)) + return FALSE; + } + #endif +--- 3139,3153 ---- + prt_dsc_noarg("BeginProlog"); + + /* Add required procsets - NOTE: order is important! */ +! if (!prt_add_resource(res_prolog)) + return FALSE; + #ifdef FEAT_MBYTE + if (prt_out_mbyte) + { + /* Add CID font procset, and any user supplied CMap */ +! if (!prt_add_resource(res_cidfont)) + return FALSE; +! if (prt_custom_cmap && !prt_add_resource(res_cmap)) + return FALSE; + } + #endif +*************** +*** 3132,3138 **** + #endif + /* There will be only one Roman font encoding to be included in the PS + * file. */ +! if (!prt_add_resource(&res_encoding)) + return FALSE; + + prt_dsc_noarg("EndProlog"); +--- 3157,3163 ---- + #endif + /* There will be only one Roman font encoding to be included in the PS + * file. */ +! if (!prt_add_resource(res_encoding)) + return FALSE; + + prt_dsc_noarg("EndProlog"); +*************** +*** 3248,3254 **** + prt_dsc_noarg("EndSetup"); + + /* Fail if any problems writing out to the PS file */ +! return !prt_file_error; + } + + void +--- 3273,3289 ---- + prt_dsc_noarg("EndSetup"); + + /* Fail if any problems writing out to the PS file */ +! retval = !prt_file_error; +! +! theend: +! vim_free(res_prolog); +! vim_free(res_encoding); +! #ifdef FEAT_MBYTE +! vim_free(res_cidfont); +! vim_free(res_cmap); +! #endif +! +! return retval; + } + + void +*** ../vim-7.3.160/src/quickfix.c 2010-12-02 15:33:10.000000000 +0100 +--- src/quickfix.c 2011-04-11 17:54:07.000000000 +0200 +*************** +*** 3049,3056 **** + int flags = 0; + colnr_T col; + long tomatch; +! char_u dirname_start[MAXPATHL]; +! char_u dirname_now[MAXPATHL]; + char_u *target_dir = NULL; + #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; +--- 3049,3056 ---- + int flags = 0; + colnr_T col; + long tomatch; +! char_u *dirname_start = NULL; +! char_u *dirname_now = NULL; + char_u *target_dir = NULL; + #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; +*************** +*** 3128,3133 **** +--- 3128,3138 ---- + goto theend; + } + ++ dirname_start = alloc(MAXPATHL); ++ dirname_now = alloc(MAXPATHL); ++ if (dirname_start == NULL || dirname_now == NULL) ++ goto theend; ++ + /* Remember the current directory, because a BufRead autocommand that does + * ":lcd %:p:h" changes the meaning of short path names. */ + mch_dirname(dirname_start, MAXPATHL); +*************** +*** 3364,3369 **** +--- 3369,3376 ---- + } + + theend: ++ vim_free(dirname_now); ++ vim_free(dirname_start); + vim_free(target_dir); + vim_free(regmatch.regprog); + } +*** ../vim-7.3.160/src/main.c 2011-03-22 18:10:34.000000000 +0100 +--- src/main.c 2011-04-11 18:06:06.000000000 +0200 +*************** +*** 3814,3820 **** + int i; + char_u *inicmd = NULL; + char_u *p; +! char_u cwd[MAXPATHL]; + + if (filec > 0 && filev[0][0] == '+') + { +--- 3814,3820 ---- + int i; + char_u *inicmd = NULL; + char_u *p; +! char_u *cwd; + + if (filec > 0 && filev[0][0] == '+') + { +*************** +*** 3827,3841 **** + mainerr_arg_missing((char_u *)filev[-1]); + + /* Temporarily cd to the current directory to handle relative file names. */ + if (mch_dirname(cwd, MAXPATHL) != OK) + return NULL; +! if ((p = vim_strsave_escaped_ext(cwd, + #ifdef BACKSLASH_IN_FILENAME + "", /* rem_backslash() will tell what chars to escape */ + #else + PATH_ESC_CHARS, + #endif +! '\\', TRUE)) == NULL) + return NULL; + ga_init2(&ga, 1, 100); + ga_concat(&ga, (char_u *)":cd "); +--- 3827,3849 ---- + mainerr_arg_missing((char_u *)filev[-1]); + + /* Temporarily cd to the current directory to handle relative file names. */ ++ cwd = alloc(MAXPATHL); ++ if (cwd == NULL) ++ return NULL; + if (mch_dirname(cwd, MAXPATHL) != OK) ++ { ++ vim_free(cwd); + return NULL; +! } +! p = vim_strsave_escaped_ext(cwd, + #ifdef BACKSLASH_IN_FILENAME + "", /* rem_backslash() will tell what chars to escape */ + #else + PATH_ESC_CHARS, + #endif +! '\\', TRUE); +! vim_free(cwd); +! if (p == NULL) + return NULL; + ga_init2(&ga, 1, 100); + ga_concat(&ga, (char_u *)":cd "); +*** ../vim-7.3.160/src/netbeans.c 2011-04-11 16:56:29.000000000 +0200 +--- src/netbeans.c 2011-04-11 18:27:08.000000000 +0200 +*************** +*** 2891,2897 **** + char_u *text; + linenr_T lnum; + int col; +! char buf[MAXPATHL * 2 + 25]; + char_u *p; + + /* Don't do anything when 'ballooneval' is off, messages scrolled the +--- 2891,2897 ---- + char_u *text; + linenr_T lnum; + int col; +! char *buf; + char_u *p; + + /* Don't do anything when 'ballooneval' is off, messages scrolled the +*************** +*** 2905,2919 **** + * length. */ + if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL) + { +! p = nb_quote(text); +! if (p != NULL) + { +! vim_snprintf(buf, sizeof(buf), +! "0:balloonText=%d \"%s\"\n", r_cmdno, p); +! vim_free(p); + } +- nbdebug(("EVT: %s", buf)); +- nb_send(buf, "netbeans_beval_cb"); + } + vim_free(text); + } +--- 2905,2924 ---- + * length. */ + if (text != NULL && text[0] != NUL && STRLEN(text) < MAXPATHL) + { +! buf = (char *)alloc(MAXPATHL * 2 + 25); +! if (buf != NULL) + { +! p = nb_quote(text); +! if (p != NULL) +! { +! vim_snprintf(buf, MAXPATHL * 2 + 25, +! "0:balloonText=%d \"%s\"\n", r_cmdno, p); +! vim_free(p); +! } +! nbdebug(("EVT: %s", buf)); +! nb_send(buf, "netbeans_beval_cb"); +! vim_free(buf); + } + } + vim_free(text); + } +*** ../vim-7.3.160/src/spell.c 2011-04-11 16:56:29.000000000 +0200 +--- src/spell.c 2011-04-11 18:00:49.000000000 +0200 +*************** +*** 8590,8596 **** + spellinfo_T *spin; + char_u *wfname; + { +! char_u fname[MAXPATHL]; + int len; + slang_T *slang; + int free_slang = FALSE; +--- 8590,8596 ---- + spellinfo_T *spin; + char_u *wfname; + { +! char_u *fname = NULL; + int len; + slang_T *slang; + int free_slang = FALSE; +*************** +*** 8654,8659 **** +--- 8654,8662 ---- + * Write the .sug file. + * Make the file name by changing ".spl" to ".sug". + */ ++ fname = alloc(MAXPATHL); ++ if (fname == NULL) ++ goto theend; + vim_strncpy(fname, wfname, MAXPATHL - 1); + len = (int)STRLEN(fname); + fname[len - 2] = 'u'; +*************** +*** 8661,8666 **** +--- 8664,8670 ---- + sug_write(spin, fname); + + theend: ++ vim_free(fname); + if (free_slang) + slang_free(slang); + free_blocks(spin->si_blocks); +*************** +*** 9106,9113 **** + int overwrite; /* overwrite existing output file */ + int added_word; /* invoked through "zg" */ + { +! char_u fname[MAXPATHL]; +! char_u wfname[MAXPATHL]; + char_u **innames; + int incount; + afffile_T *(afile[8]); +--- 9110,9117 ---- + int overwrite; /* overwrite existing output file */ + int added_word; /* invoked through "zg" */ + { +! char_u *fname = NULL; +! char_u *wfname; + char_u **innames; + int incount; + afffile_T *(afile[8]); +*************** +*** 9135,9140 **** +--- 9139,9148 ---- + innames = &fnames[1]; + incount = fcount - 1; + ++ wfname = alloc(MAXPATHL); ++ if (wfname == NULL) ++ return; ++ + if (fcount >= 1) + { + len = (int)STRLEN(fnames[0]); +*************** +*** 9144,9167 **** + * "path/en.latin1.add.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), "%s.spl", fnames[0]); + } + else if (fcount == 1) + { + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { + /* Name ends in ".spl", use as the file name. */ +! vim_strncpy(wfname, fnames[0], sizeof(wfname) - 1); + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +--- 9152,9175 ---- + * "path/en.latin1.add.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, MAXPATHL, "%s.spl", fnames[0]); + } + else if (fcount == 1) + { + /* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */ + innames = &fnames[0]; + incount = 1; +! vim_snprintf((char *)wfname, MAXPATHL, SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + } + else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0) + { + /* Name ends in ".spl", use as the file name. */ +! vim_strncpy(wfname, fnames[0], MAXPATHL - 1); + } + else + /* Name should be language, make the file name from it. */ +! vim_snprintf((char *)wfname, MAXPATHL, SPL_FNAME_TMPL, + fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc()); + + /* Check for .ascii.spl. */ +*************** +*** 9186,9199 **** + if (!overwrite && mch_stat((char *)wfname, &st) >= 0) + { + EMSG(_(e_exists)); +! return; + } + if (mch_isdir(wfname)) + { + EMSG2(_(e_isadir2), wfname); +! return; + } + + /* + * Init the aff and dic pointers. + * Get the region names if there are more than 2 arguments. +--- 9194,9211 ---- + if (!overwrite && mch_stat((char *)wfname, &st) >= 0) + { + EMSG(_(e_exists)); +! goto theend; + } + if (mch_isdir(wfname)) + { + EMSG2(_(e_isadir2), wfname); +! goto theend; + } + ++ fname = alloc(MAXPATHL); ++ if (fname == NULL) ++ goto theend; ++ + /* + * Init the aff and dic pointers. + * Get the region names if there are more than 2 arguments. +*************** +*** 9209,9215 **** + || innames[i][len - 3] != '_') + { + EMSG2(_("E755: Invalid region in %s"), innames[i]); +! return; + } + spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]); + spin.si_region_name[i * 2 + 1] = +--- 9221,9227 ---- + || innames[i][len - 3] != '_') + { + EMSG2(_("E755: Invalid region in %s"), innames[i]); +! goto theend; + } + spin.si_region_name[i * 2] = TOLOWER_ASC(innames[i][len - 2]); + spin.si_region_name[i * 2 + 1] = +*************** +*** 9226,9232 **** + || spin.si_prefroot == NULL) + { + free_blocks(spin.si_blocks); +! return; + } + + /* When not producing a .add.spl file clear the character table when +--- 9238,9244 ---- + || spin.si_prefroot == NULL) + { + free_blocks(spin.si_blocks); +! goto theend; + } + + /* When not producing a .add.spl file clear the character table when +*************** +*** 9247,9253 **** + spin.si_conv.vc_type = CONV_NONE; + spin.si_region = 1 << i; + +! vim_snprintf((char *)fname, sizeof(fname), "%s.aff", innames[i]); + if (mch_stat((char *)fname, &st) >= 0) + { + /* Read the .aff file. Will init "spin->si_conv" based on the +--- 9259,9265 ---- + spin.si_conv.vc_type = CONV_NONE; + spin.si_region = 1 << i; + +! vim_snprintf((char *)fname, MAXPATHL, "%s.aff", innames[i]); + if (mch_stat((char *)fname, &st) >= 0) + { + /* Read the .aff file. Will init "spin->si_conv" based on the +*************** +*** 9258,9264 **** + else + { + /* Read the .dic file and store the words in the trees. */ +! vim_snprintf((char *)fname, sizeof(fname), "%s.dic", + innames[i]); + if (spell_read_dic(&spin, fname, afile[i]) == FAIL) + error = TRUE; +--- 9270,9276 ---- + else + { + /* Read the .dic file and store the words in the trees. */ +! vim_snprintf((char *)fname, MAXPATHL, "%s.dic", + innames[i]); + if (spell_read_dic(&spin, fname, afile[i]) == FAIL) + error = TRUE; +*************** +*** 9340,9345 **** +--- 9352,9361 ---- + spell_make_sugfile(&spin, wfname); + + } ++ ++ theend: ++ vim_free(fname); ++ vim_free(wfname); + } + + /* +*************** +*** 9392,9398 **** + buf_T *buf = NULL; + int new_spf = FALSE; + char_u *fname; +! char_u fnamebuf[MAXPATHL]; + char_u line[MAXWLEN * 2]; + long fpos, fpos_next = 0; + int i; +--- 9408,9414 ---- + buf_T *buf = NULL; + int new_spf = FALSE; + char_u *fname; +! char_u *fnamebuf = NULL; + char_u line[MAXWLEN * 2]; + long fpos, fpos_next = 0; + int i; +*************** +*** 9422,9427 **** +--- 9438,9446 ---- + EMSG2(_(e_notset), "spellfile"); + return; + } ++ fnamebuf = alloc(MAXPATHL); ++ if (fnamebuf == NULL) ++ return; + + for (spf = curwin->w_s->b_p_spf, i = 1; *spf != NUL; ++i) + { +*************** +*** 9431,9436 **** +--- 9450,9456 ---- + if (*spf == NUL) + { + EMSGN(_("E765: 'spellfile' does not have %ld entries"), idx); ++ vim_free(fnamebuf); + return; + } + } +*************** +*** 9442,9447 **** +--- 9462,9468 ---- + if (buf != NULL && bufIsChanged(buf)) + { + EMSG(_(e_bufloaded)); ++ vim_free(fnamebuf); + return; + } + +*************** +*** 9536,9541 **** +--- 9557,9563 ---- + + redraw_all_later(SOME_VALID); + } ++ vim_free(fnamebuf); + } + + /* +*************** +*** 9544,9550 **** + static void + init_spellfile() + { +! char_u buf[MAXPATHL]; + int l; + char_u *fname; + char_u *rtp; +--- 9566,9572 ---- + static void + init_spellfile() + { +! char_u *buf; + int l; + char_u *fname; + char_u *rtp; +*************** +*** 9554,9559 **** +--- 9576,9585 ---- + + if (*curwin->w_s->b_p_spl != NUL && curwin->w_s->b_langp.ga_len > 0) + { ++ buf = alloc(MAXPATHL); ++ if (buf == NULL) ++ return; ++ + /* Find the end of the language name. Exclude the region. If there + * is a path separator remember the start of the tail. */ + for (lend = curwin->w_s->b_p_spl; *lend != NUL +*************** +*** 9597,9603 **** + "/%.*s", (int)(lend - lstart), lstart); + } + l = (int)STRLEN(buf); +! fname = LANGP_ENTRY(curwin->w_s->b_langp, 0)->lp_slang->sl_fname; + vim_snprintf((char *)buf + l, MAXPATHL - l, ".%s.add", + fname != NULL + && strstr((char *)gettail(fname), ".ascii.") != NULL +--- 9623,9630 ---- + "/%.*s", (int)(lend - lstart), lstart); + } + l = (int)STRLEN(buf); +! fname = LANGP_ENTRY(curwin->w_s->b_langp, 0) +! ->lp_slang->sl_fname; + vim_snprintf((char *)buf + l, MAXPATHL - l, ".%s.add", + fname != NULL + && strstr((char *)gettail(fname), ".ascii.") != NULL +*************** +*** 9607,9612 **** +--- 9634,9641 ---- + } + aspath = FALSE; + } ++ ++ vim_free(buf); + } + } + +*** ../vim-7.3.160/src/tag.c 2011-04-11 16:56:29.000000000 +0200 +--- src/tag.c 2011-04-11 20:54:36.000000000 +0200 +*************** +*** 775,791 **** + { + list_T *list; + char_u tag_name[128 + 1]; +! char_u fname[MAXPATHL + 1]; +! char_u cmd[CMDBUFFSIZE + 1]; + + /* + * Add the matching tags to the location list for the current + * window. + */ + + list = list_alloc(); +! if (list == NULL) + goto end_do_tag; + + for (i = 0; i < num_matches; ++i) + { +--- 775,799 ---- + { + list_T *list; + char_u tag_name[128 + 1]; +! char_u *fname; +! char_u *cmd; + + /* + * Add the matching tags to the location list for the current + * window. + */ + ++ fname = alloc(MAXPATHL + 1); ++ cmd = alloc(CMDBUFFSIZE + 1); + list = list_alloc(); +! if (list == NULL || fname == NULL || cmd == NULL) +! { +! vim_free(cmd); +! vim_free(fname); +! if (list != NULL) +! list_free(list, TRUE); + goto end_do_tag; ++ } + + for (i = 0; i < num_matches; ++i) + { +*************** +*** 911,916 **** +--- 919,926 ---- + set_errorlist(curwin, list, ' ', IObuff); + + list_free(list, TRUE); ++ vim_free(fname); ++ vim_free(cmd); + + cur_match = 0; /* Jump to the first tag */ + } +*************** +*** 3777,3784 **** + char_u *start; /* start of the value */ + char_u *end; /* after the value; can be NULL */ + { +! char_u buf[MAXPATHL]; + int len = 0; + + /* check that the field name doesn't exist yet */ + if (dict_find(dict, (char_u *)field_name, -1) != NULL) +--- 3787,3795 ---- + char_u *start; /* start of the value */ + char_u *end; /* after the value; can be NULL */ + { +! char_u *buf; + int len = 0; ++ int retval; + + /* check that the field name doesn't exist yet */ + if (dict_find(dict, (char_u *)field_name, -1) != NULL) +*************** +*** 3791,3796 **** +--- 3802,3810 ---- + } + return FAIL; + } ++ buf = alloc(MAXPATHL); ++ if (buf == NULL) ++ return FAIL; + if (start != NULL) + { + if (end == NULL) +*************** +*** 3800,3811 **** + --end; + } + len = (int)(end - start); +! if (len > (int)sizeof(buf) - 1) +! len = sizeof(buf) - 1; + vim_strncpy(buf, start, len); + } + buf[len] = NUL; +! return dict_add_nr_str(dict, field_name, 0L, buf); + } + + /* +--- 3814,3827 ---- + --end; + } + len = (int)(end - start); +! if (len > MAXPATHL - 1) +! len = MAXPATHL - 1; + vim_strncpy(buf, start, len); + } + buf[len] = NUL; +! retval = dict_add_nr_str(dict, field_name, 0L, buf); +! vim_free(buf); +! return retval; + } + + /* +*** ../vim-7.3.160/src/vim.h 2010-12-30 12:30:26.000000000 +0100 +--- src/vim.h 2011-04-11 20:50:54.000000000 +0200 +*************** +*** 1435,1440 **** +--- 1435,1442 ---- + + #define IOSIZE (1024+1) /* file i/o and sprintf buffer size */ + ++ #define DIALOG_MSG_SIZE 1000 /* buffer size for dialog_msg() */ ++ + #ifdef FEAT_MBYTE + # define MSG_BUF_LEN 480 /* length of buffer for small messages */ + # define MSG_BUF_CLEN (MSG_BUF_LEN / 6) /* cell length (worst case: utf-8 +*** ../vim-7.3.160/src/xxd/xxd.c 2011-04-02 14:44:50.000000000 +0200 +--- src/xxd/xxd.c 2011-04-11 16:40:48.000000000 +0200 +*************** +*** 476,482 **** + int octspergrp = -1; /* number of octets grouped in output */ + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; +! char l[LLEN+1]; + char *pp; + + #ifdef AMIGA +--- 476,482 ---- + int octspergrp = -1; /* number of octets grouped in output */ + int grplen; /* total chars per octet group */ + long length = -1, n = 0, seekoff = 0; +! static char l[LLEN+1]; /* static because it may be too big for stack */ + char *pp; + + #ifdef AMIGA +*** ../vim-7.3.160/src/version.c 2011-04-11 16:56:29.000000000 +0200 +--- src/version.c 2011-04-11 21:15:33.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 161, + /**/ + +-- +The process for understanding customers primarily involves sitting around with +other marketing people and talking about what you would to if you were dumb +enough to be a customer. + (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 /// diff --git a/source/ap/vim/patches/7.3.162 b/source/ap/vim/patches/7.3.162 new file mode 100644 index 000000000..3f0173afb --- /dev/null +++ b/source/ap/vim/patches/7.3.162 @@ -0,0 +1,83 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.162 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.162 +Problem: No error message when assigning to a list with an index out of + range. (Yukihiro Nakadaira) +Solution: Add the error message. +Files: src/eval.c + + +*** ../vim-7.3.161/src/eval.c 2011-04-11 21:35:03.000000000 +0200 +--- src/eval.c 2011-04-21 13:40:38.000000000 +0200 +*************** +*** 2794,2799 **** +--- 2794,2801 ---- + { + if (lp->ll_range && !lp->ll_empty2) + clear_tv(&var2); ++ if (!quiet) ++ EMSGN(_(e_listidx), lp->ll_n1); + return NULL; + } + +*************** +*** 2811,2817 **** +--- 2813,2823 ---- + { + ni = list_find(lp->ll_list, lp->ll_n2); + if (ni == NULL) ++ { ++ if (!quiet) ++ EMSGN(_(e_listidx), lp->ll_n2); + return NULL; ++ } + lp->ll_n2 = list_idx_of_item(lp->ll_list, ni); + } + +*************** +*** 2819,2825 **** +--- 2825,2835 ---- + if (lp->ll_n1 < 0) + lp->ll_n1 = list_idx_of_item(lp->ll_list, lp->ll_li); + if (lp->ll_n2 < lp->ll_n1) ++ { ++ if (!quiet) ++ EMSGN(_(e_listidx), lp->ll_n2); + return NULL; ++ } + } + + lp->ll_tv = &lp->ll_li->li_tv; +*** ../vim-7.3.161/src/version.c 2011-04-11 21:35:03.000000000 +0200 +--- src/version.c 2011-04-21 13:44:46.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 162, + /**/ + +-- +Far back in the mists of ancient time, in the great and glorious days of the +former Galactic Empire, life was wild, rich and largely tax free. +Mighty starships plied their way between exotic suns, seeking adventure and +reward among the furthest reaches of Galactic space. In those days, spirits +were brave, the stakes were high, men were real men, women were real women +and small furry creatures from Alpha Centauri were real small furry creatures +from Alpha Centauri. And all dared to brave unknown terrors, to do mighty +deeds, to boldly split infinitives that no man had split before -- and thus +was the Empire forged. + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.163 b/source/ap/vim/patches/7.3.163 new file mode 100644 index 000000000..b5f1cb4ad --- /dev/null +++ b/source/ap/vim/patches/7.3.163 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.163 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.163 +Problem: For the default of 'shellpipe' "mksh" and "pdksh" are not + recognized. +Solution: Recognize these shell names. +Files: src/option.c + + +*** ../vim-7.3.162/src/option.c 2011-03-22 14:35:01.000000000 +0100 +--- src/option.c 2011-04-15 20:49:54.000000000 +0200 +*************** +*** 3846,3851 **** +--- 3846,3853 ---- + # ifndef OS2 /* Always use bourne shell style redirection if we reach this */ + if ( fnamecmp(p, "sh") == 0 + || fnamecmp(p, "ksh") == 0 ++ || fnamecmp(p, "mksh") == 0 ++ || fnamecmp(p, "pdksh") == 0 + || fnamecmp(p, "zsh") == 0 + || fnamecmp(p, "zsh-beta") == 0 + || fnamecmp(p, "bash") == 0 +*************** +*** 3853,3858 **** +--- 3855,3862 ---- + || fnamecmp(p, "cmd") == 0 + || fnamecmp(p, "sh.exe") == 0 + || fnamecmp(p, "ksh.exe") == 0 ++ || fnamecmp(p, "mksh.exe") == 0 ++ || fnamecmp(p, "pdksh.exe") == 0 + || fnamecmp(p, "zsh.exe") == 0 + || fnamecmp(p, "zsh-beta.exe") == 0 + || fnamecmp(p, "bash.exe") == 0 +*** ../vim-7.3.162/src/version.c 2011-04-21 14:27:21.000000000 +0200 +--- src/version.c 2011-04-28 12:56:03.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 163, + /**/ + +-- +If you put 7 of the most talented OSS developers in a room for a week +and asked them to fix a bug in a spreadsheet program, in 1 week +you'd have 2 new mail readers and a text-based web browser. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.164 b/source/ap/vim/patches/7.3.164 new file mode 100644 index 000000000..9049f1b58 --- /dev/null +++ b/source/ap/vim/patches/7.3.164 @@ -0,0 +1,181 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.164 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.164 +Problem: C-indenting: a preprocessor statement confuses detection of a + function delcaration. +Solution: Ignore preprocessor lines. (Lech Lorens) Also recognize the style + to put a comma before the argument name. +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.163/src/misc1.c 2011-04-11 16:56:29.000000000 +0200 +--- src/misc1.c 2011-04-28 12:49:55.000000000 +0200 +*************** +*** 5396,5403 **** + cin_ispreproc(s) + char_u *s; + { +! s = skipwhite(s); +! if (*s == '#') + return TRUE; + return FALSE; + } +--- 5396,5402 ---- + cin_ispreproc(s) + char_u *s; + { +! if (*skipwhite(s) == '#') + return TRUE; + return FALSE; + } +*************** +*** 5513,5518 **** +--- 5512,5521 ---- + else + s = *sp; + ++ /* Ignore line starting with #. */ ++ if (cin_ispreproc(s)) ++ return FALSE; ++ + while (*s && *s != '(' && *s != ';' && *s != '\'' && *s != '"') + { + if (cin_iscomment(s)) /* ignore comments */ +*************** +*** 5538,5550 **** + retval = TRUE; + goto done; + } +! if (*s == ',' && cin_nocode(s + 1)) + { +! /* ',' at the end: continue looking in the next line */ + if (lnum >= curbuf->b_ml.ml_line_count) + break; +! +! s = ml_get(++lnum); + } + else if (cin_iscomment(s)) /* ignore comments */ + s = cin_skipcomment(s); +--- 5541,5569 ---- + retval = TRUE; + goto done; + } +! if ((*s == ',' && cin_nocode(s + 1)) || s[1] == NUL || cin_nocode(s)) + { +! int comma = (*s == ','); +! +! /* ',' at the end: continue looking in the next line. +! * At the end: check for ',' in the next line, for this style: +! * func(arg1 +! * , arg2) */ +! for (;;) +! { +! if (lnum >= curbuf->b_ml.ml_line_count) +! break; +! s = ml_get(++lnum); +! if (!cin_ispreproc(s)) +! break; +! } + if (lnum >= curbuf->b_ml.ml_line_count) + break; +! /* Require a comma at end of the line or a comma or ')' at the +! * start of next line. */ +! s = skipwhite(s); +! if (!comma && *s != ',' && *s != ')') +! break; + } + else if (cin_iscomment(s)) /* ignore comments */ + s = cin_skipcomment(s); +*** ../vim-7.3.163/src/testdir/test3.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test3.in 2011-04-28 12:15:12.000000000 +0200 +*************** +*** 1315,1320 **** +--- 1315,1349 ---- + } + + STARTTEST ++ :set cino=(0,ts ++ 2kdd=][ ++ ENDTEST ++ ++ void func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ ++ STARTTEST ++ :set cino=(0 ++ 2kdd=][ ++ ENDTEST ++ ++ void ++ func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.163/src/testdir/test3.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test3.ok 2011-04-28 12:54:04.000000000 +0200 +*************** +*** 1183,1185 **** +--- 1183,1206 ---- + foo; + } + ++ ++ void func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ ++ ++ void ++ func(int a ++ #if defined(FOO) ++ , int b ++ , int c ++ #endif ++ ) ++ { ++ } ++ +*** ../vim-7.3.163/src/version.c 2011-04-28 12:56:57.000000000 +0200 +--- src/version.c 2011-04-28 12:59:55.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 164, + /**/ + +-- +Due knot trussed yore spell chequer two fined awl miss steaks. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.165 b/source/ap/vim/patches/7.3.165 new file mode 100644 index 000000000..2725259e3 --- /dev/null +++ b/source/ap/vim/patches/7.3.165 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.165 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.165 +Problem: ":find" completion does not escape spaces in a directory name. + (Isz) +Solution: Add backslashes for EXPAND_FILES_IN_PATH. (Carlo Teubner) +Files: src/ex_getln.c + + +*** ../vim-7.3.164/src/ex_getln.c 2010-12-02 16:01:23.000000000 +0100 +--- src/ex_getln.c 2011-04-28 12:52:12.000000000 +0200 +*************** +*** 3702,3707 **** +--- 3702,3708 ---- + if (options & WILD_ESCAPE) + { + if (xp->xp_context == EXPAND_FILES ++ || xp->xp_context == EXPAND_FILES_IN_PATH + || xp->xp_context == EXPAND_SHELLCMD + || xp->xp_context == EXPAND_BUFFERS + || xp->xp_context == EXPAND_DIRECTORIES) +*** ../vim-7.3.164/src/version.c 2011-04-28 13:01:59.000000000 +0200 +--- src/version.c 2011-04-28 17:17:53.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 165, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail + on the way back to bed. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.166 b/source/ap/vim/patches/7.3.166 new file mode 100644 index 000000000..93c6ed353 --- /dev/null +++ b/source/ap/vim/patches/7.3.166 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.166 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.166 +Problem: Buffer on the stack may be too big +Solution: Allocate the space. +Files: src/option.c + + +*** ../vim-7.3.165/src/option.c 2011-04-28 12:56:57.000000000 +0200 +--- src/option.c 2011-04-15 20:49:54.000000000 +0200 +*************** +*** 9185,9191 **** + int expand; + { + char_u *s; +! char_u buf[MAXPATHL]; + + if (fprintf(fd, "%s %s=", cmd, name) < 0) + return FAIL; +--- 9185,9191 ---- + int expand; + { + char_u *s; +! char_u *buf; + + if (fprintf(fd, "%s %s=", cmd, name) < 0) + return FAIL; +*************** +*** 9203,9211 **** +--- 9203,9218 ---- + } + else if (expand) + { ++ buf = alloc(MAXPATHL); ++ if (buf == NULL) ++ return FAIL; + home_replace(NULL, *valuep, buf, MAXPATHL, FALSE); + if (put_escstr(fd, buf, 2) == FAIL) ++ { ++ vim_free(buf); + return FAIL; ++ } ++ vim_free(buf); + } + else if (put_escstr(fd, *valuep, 2) == FAIL) + return FAIL; +*** ../vim-7.3.165/src/version.c 2011-04-28 17:21:49.000000000 +0200 +--- src/version.c 2011-04-28 17:23:24.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 166, + /**/ + +-- +He who laughs last, thinks slowest. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.167 b/source/ap/vim/patches/7.3.167 new file mode 100644 index 000000000..4a6de89fb --- /dev/null +++ b/source/ap/vim/patches/7.3.167 @@ -0,0 +1,96 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.167 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.167 +Problem: When using the internal grep QuickFixCmdPost is not triggered. + (Yukihiro Nakadaira) +Solution: Change the place where autocommands are triggered. +Files: src/quickfix.c + + +*** ../vim-7.3.166/src/quickfix.c 2011-04-11 21:35:03.000000000 +0200 +--- src/quickfix.c 2011-04-28 13:28:03.000000000 +0200 +*************** +*** 2742,2747 **** +--- 2742,2754 ---- + #ifdef FEAT_AUTOCMD + char_u *au_name = NULL; + ++ /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */ ++ if (grep_internal(eap->cmdidx)) ++ { ++ ex_vimgrep(eap); ++ return; ++ } ++ + switch (eap->cmdidx) + { + case CMD_make: au_name = (char_u *)"make"; break; +*************** +*** 2763,2775 **** + } + #endif + +- /* Redirect ":grep" to ":vimgrep" if 'grepprg' is "internal". */ +- if (grep_internal(eap->cmdidx)) +- { +- ex_vimgrep(eap); +- return; +- } +- + if (eap->cmdidx == CMD_lmake || eap->cmdidx == CMD_lgrep + || eap->cmdidx == CMD_lgrepadd) + wp = curwin; +--- 2770,2775 ---- +*************** +*** 3057,3066 **** + + switch (eap->cmdidx) + { +! case CMD_vimgrep: au_name = (char_u *)"vimgrep"; break; +! case CMD_lvimgrep: au_name = (char_u *)"lvimgrep"; break; +! case CMD_vimgrepadd: au_name = (char_u *)"vimgrepadd"; break; + case CMD_lvimgrepadd: au_name = (char_u *)"lvimgrepadd"; break; + default: break; + } + if (au_name != NULL) +--- 3057,3070 ---- + + switch (eap->cmdidx) + { +! case CMD_vimgrep: au_name = (char_u *)"vimgrep"; break; +! case CMD_lvimgrep: au_name = (char_u *)"lvimgrep"; break; +! case CMD_vimgrepadd: au_name = (char_u *)"vimgrepadd"; break; + case CMD_lvimgrepadd: au_name = (char_u *)"lvimgrepadd"; break; ++ case CMD_grep: au_name = (char_u *)"grep"; break; ++ case CMD_lgrep: au_name = (char_u *)"lgrep"; break; ++ case CMD_grepadd: au_name = (char_u *)"grepadd"; break; ++ case CMD_lgrepadd: au_name = (char_u *)"lgrepadd"; break; + default: break; + } + if (au_name != NULL) +*** ../vim-7.3.166/src/version.c 2011-04-28 17:24:54.000000000 +0200 +--- src/version.c 2011-04-28 17:26:17.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 167, + /**/ + +-- +Micro$oft: where do you want to go today? + Linux: where do you want to go tomorrow? + FreeBSD: are you guys coming, or what? + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.168 b/source/ap/vim/patches/7.3.168 new file mode 100644 index 000000000..3d6fe9472 --- /dev/null +++ b/source/ap/vim/patches/7.3.168 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.168 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.168 +Problem: When the second argument of input() contains a CR the text up to + that is used without asking the user. (Yasuhiro Matsumoto) +Solution: Change CR, NL and ESC in the text to a space. +Files: src/getchar.c + + +*** ../vim-7.3.167/src/getchar.c 2011-03-22 13:07:19.000000000 +0100 +--- src/getchar.c 2011-04-28 14:50:26.000000000 +0200 +*************** +*** 635,645 **** +--- 635,648 ---- + /* + * Stuff "s" into the stuff buffer, leaving special key codes unmodified and + * escaping other K_SPECIAL and CSI bytes. ++ * Change CR, LF and ESC into a space. + */ + void + stuffReadbuffSpec(s) + char_u *s; + { ++ int c; ++ + while (*s != NUL) + { + if (*s == K_SPECIAL && s[1] != NUL && s[2] != NUL) +*************** +*** 649,659 **** + s += 3; + } + else + #ifdef FEAT_MBYTE +! stuffcharReadbuff(mb_ptr2char_adv(&s)); + #else +! stuffcharReadbuff(*s++); + #endif + } + } + #endif +--- 652,667 ---- + s += 3; + } + else ++ { + #ifdef FEAT_MBYTE +! c = mb_ptr2char_adv(&s); + #else +! c = *s++; + #endif ++ if (c == CAR || c == NL || c == ESC) ++ c = ' '; ++ stuffcharReadbuff(c); ++ } + } + } + #endif +*** ../vim-7.3.167/src/version.c 2011-04-28 17:27:05.000000000 +0200 +--- src/version.c 2011-04-28 17:28:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 168, + /**/ + +-- +Everyone has a photographic memory. Some don't have film. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.169 b/source/ap/vim/patches/7.3.169 new file mode 100644 index 000000000..056ca99f6 --- /dev/null +++ b/source/ap/vim/patches/7.3.169 @@ -0,0 +1,130 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.169 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.169 +Problem: Freeing memory already freed, warning from static code analyzer. +Solution: Initialize pointers to NULL, correct use of "mustfree". (partly by + Dominique Pelle) +Files: src/mis1.c + + +*** ../vim-7.3.168/src/misc1.c 2011-04-28 13:01:59.000000000 +0200 +--- src/misc1.c 2011-04-28 17:42:00.000000000 +0200 +*************** +*** 3505,3511 **** + if (enc_utf8 && var != NULL) + { + int len; +! char_u *pp; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +--- 3505,3511 ---- + if (enc_utf8 && var != NULL) + { + int len; +! char_u *pp = NULL; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +*************** +*** 3872,3882 **** + * Vim's version of getenv(). + * Special handling of $HOME, $VIM and $VIMRUNTIME. + * Also does ACP to 'enc' conversion for Win32. + */ + char_u * + vim_getenv(name, mustfree) + char_u *name; +! int *mustfree; /* set to TRUE when returned is allocated */ + { + char_u *p; + char_u *pend; +--- 3872,3884 ---- + * Vim's version of getenv(). + * Special handling of $HOME, $VIM and $VIMRUNTIME. + * Also does ACP to 'enc' conversion for Win32. ++ * "mustfree" is set to TRUE when returned is allocated, it must be ++ * initialized to FALSE by the caller. + */ + char_u * + vim_getenv(name, mustfree) + char_u *name; +! int *mustfree; + { + char_u *p; + char_u *pend; +*************** +*** 3898,3904 **** + if (enc_utf8) + { + int len; +! char_u *pp; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +--- 3900,3906 ---- + if (enc_utf8) + { + int len; +! char_u *pp = NULL; + + /* Convert from active codepage to UTF-8. Other conversions are + * not done, because they would fail for non-ASCII characters. */ +*************** +*** 3942,3948 **** + if (enc_utf8) + { + int len; +! char_u *pp; + + /* Convert from active codepage to UTF-8. Other conversions + * are not done, because they would fail for non-ASCII +--- 3944,3950 ---- + if (enc_utf8) + { + int len; +! char_u *pp = NULL; + + /* Convert from active codepage to UTF-8. Other conversions + * are not done, because they would fail for non-ASCII +*************** +*** 3950,3956 **** + acp_to_enc(p, (int)STRLEN(p), &pp, &len); + if (pp != NULL) + { +! if (mustfree) + vim_free(p); + p = pp; + *mustfree = TRUE; +--- 3952,3958 ---- + acp_to_enc(p, (int)STRLEN(p), &pp, &len); + if (pp != NULL) + { +! if (*mustfree) + vim_free(p); + p = pp; + *mustfree = TRUE; +*** ../vim-7.3.168/src/version.c 2011-04-28 17:30:05.000000000 +0200 +--- src/version.c 2011-04-28 17:48:04.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 169, + /**/ + +-- +A day without sunshine is like, well, night. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.170 b/source/ap/vim/patches/7.3.170 new file mode 100644 index 000000000..933173ea8 --- /dev/null +++ b/source/ap/vim/patches/7.3.170 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.170 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.170 +Problem: VMS Makefile for testing was not updated for test77. +Solution: Add test77 to the Makefile. +Files: src/testdir/Make_vms.mms + + +*** ../vim-7.3.169/src/testdir/Make_vms.mms 2010-11-10 16:54:16.000000000 +0100 +--- src/testdir/Make_vms.mms 2011-03-03 17:04:56.000000000 +0100 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2010 Nov 10 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Mar 03 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 74,80 **** + test56.out test57.out test60.out \ + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ +! test71.out test72.out test74.out test75.out test76.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 74,81 ---- + test56.out test57.out test60.out \ + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ +! test71.out test72.out test74.out test75.out test76.out \ +! test77.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.169/src/version.c 2011-04-28 17:48:39.000000000 +0200 +--- src/version.c 2011-04-28 19:04:33.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 170, + /**/ + +-- +The users that I support would double-click on a landmine to find out +what happens. -- A system administrator + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.171 b/source/ap/vim/patches/7.3.171 new file mode 100644 index 000000000..f965e0a20 --- /dev/null +++ b/source/ap/vim/patches/7.3.171 @@ -0,0 +1,142 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.171 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.171 +Problem: When the clipboard isn't supported: ":yank*" gives a confusing + error message. +Solution: Specifically mention that the register name is invalid. + (Jean-Rene David) +Files: runtime/doc/change.txt, src/ex_docmd.c, src/globals.h + + +*** ../vim-7.3.170/runtime/doc/change.txt 2010-08-15 21:57:18.000000000 +0200 +--- runtime/doc/change.txt 2011-05-05 13:48:00.000000000 +0200 +*************** +*** 916,923 **** + {Visual}["x]Y Yank the highlighted lines [into register x] (for + {Visual} see |Visual-mode|). {not in Vi} + +! *:y* *:yank* +! :[range]y[ank] [x] Yank [range] lines [into register x]. + + :[range]y[ank] [x] {count} + Yank {count} lines, starting with last line number +--- 917,926 ---- + {Visual}["x]Y Yank the highlighted lines [into register x] (for + {Visual} see |Visual-mode|). {not in Vi} + +! *:y* *:yank* *E850* +! :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the +! "* or "+ registers is possible only in GUI versions or +! when the |+xterm_clipboard| feature is included. + + :[range]y[ank] [x] {count} + Yank {count} lines, starting with last line number +*** ../vim-7.3.170/src/ex_docmd.c 2011-04-11 21:35:03.000000000 +0200 +--- src/ex_docmd.c 2011-05-05 13:48:57.000000000 +0200 +*************** +*** 2424,2448 **** + if ( (ea.argt & REGSTR) + && *ea.arg != NUL + #ifdef FEAT_USR_CMDS +- && valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put +- && USER_CMDIDX(ea.cmdidx))) + /* Do not allow register = for user commands */ + && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=') +- #else +- && valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put) + #endif + && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg))) + { +! ea.regname = *ea.arg++; +! #ifdef FEAT_EVAL +! /* for '=' register: accept the rest of the line as an expression */ +! if (ea.arg[-1] == '=' && ea.arg[0] != NUL) + { +! set_expr_line(vim_strsave(ea.arg)); +! ea.arg += STRLEN(ea.arg); + } + #endif +! ea.arg = skipwhite(ea.arg); + } + + /* +--- 2424,2462 ---- + if ( (ea.argt & REGSTR) + && *ea.arg != NUL + #ifdef FEAT_USR_CMDS + /* Do not allow register = for user commands */ + && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=') + #endif + && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg))) + { +! #ifndef FEAT_CLIPBOARD +! /* check these explicitly for a more specific error message */ +! if (*ea.arg == '*' || *ea.arg == '+') + { +! errormsg = (char_u *)_(e_invalidreg); +! goto doend; + } + #endif +! if ( +! #ifdef FEAT_USR_CMDS +! valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put +! && USER_CMDIDX(ea.cmdidx))) +! #else +! valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put) +! #endif +! ) +! { +! ea.regname = *ea.arg++; +! #ifdef FEAT_EVAL +! /* for '=' register: accept the rest of the line as an expression */ +! if (ea.arg[-1] == '=' && ea.arg[0] != NUL) +! { +! set_expr_line(vim_strsave(ea.arg)); +! ea.arg += STRLEN(ea.arg); +! } +! #endif +! ea.arg = skipwhite(ea.arg); +! } + } + + /* +*** ../vim-7.3.170/src/globals.h 2011-02-15 17:39:14.000000000 +0100 +--- src/globals.h 2011-05-05 13:47:44.000000000 +0200 +*************** +*** 1561,1566 **** +--- 1561,1569 ---- + (defined(FEAT_INS_EXPAND) && defined(FEAT_COMPL_FUNC)) + EXTERN char_u e_notset[] INIT(= N_("E764: Option '%s' is not set")); + #endif ++ #ifndef FEAT_CLIPBOARD ++ EXTERN char_u e_invalidreg[] INIT(= N_("E850: Invalid register name")); ++ #endif + + #ifdef MACOS_X_UNIX + EXTERN short disallow_gui INIT(= FALSE); +*** ../vim-7.3.170/src/version.c 2011-04-28 19:05:01.000000000 +0200 +--- src/version.c 2011-05-05 14:24:39.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 171, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +53. To find out what time it is, you send yourself an e-mail and check the + "Date:" field. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.172 b/source/ap/vim/patches/7.3.172 new file mode 100644 index 000000000..66a785217 --- /dev/null +++ b/source/ap/vim/patches/7.3.172 @@ -0,0 +1,268 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.172 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.172 +Problem: MS-Windows: rename() might delete the file if the name differs but + it's actually the same file. +Solution: Use the file handle to check if it's the same file. (Yukihiro + Nakadaira) +Files: src/if_cscope.c, src/fileio.c, src/os_win32.c, + src/proto/os_win32.pro, src/vim.h + + +*** ../vim-7.3.171/src/if_cscope.c 2011-03-03 15:01:25.000000000 +0100 +--- src/if_cscope.c 2011-05-05 16:16:38.000000000 +0200 +*************** +*** 1412,1428 **** + { + short i, j; + #ifndef UNIX +- HANDLE hFile; + BY_HANDLE_FILE_INFORMATION bhfi; + +- vim_memset(&bhfi, 0, sizeof(bhfi)); + /* On windows 9x GetFileInformationByHandle doesn't work, so skip it */ + if (!mch_windows95()) + { +! hFile = CreateFile(fname, FILE_READ_ATTRIBUTES, 0, NULL, OPEN_EXISTING, +! FILE_ATTRIBUTE_NORMAL, NULL); +! if (hFile == INVALID_HANDLE_VALUE) + { + if (p_csverbose) + { + char *cant_msg = _("E625: cannot open cscope database: %s"); +--- 1412,1426 ---- + { + short i, j; + #ifndef UNIX + BY_HANDLE_FILE_INFORMATION bhfi; + + /* On windows 9x GetFileInformationByHandle doesn't work, so skip it */ + if (!mch_windows95()) + { +! switch (win32_fileinfo(fname, &bhfi)) + { ++ case FILEINFO_ENC_FAIL: /* enc_to_utf16() failed */ ++ case FILEINFO_READ_FAIL: /* CreateFile() failed */ + if (p_csverbose) + { + char *cant_msg = _("E625: cannot open cscope database: %s"); +*************** +*** 1438,1452 **** + (void)EMSG2(cant_msg, fname); + } + return -1; +! } +! if (!GetFileInformationByHandle(hFile, &bhfi)) +! { +! CloseHandle(hFile); + if (p_csverbose) + (void)EMSG(_("E626: cannot get cscope database information")); + return -1; + } +- CloseHandle(hFile); + } + #endif + +--- 1436,1447 ---- + (void)EMSG2(cant_msg, fname); + } + return -1; +! +! case FILEINFO_INFO_FAIL: /* GetFileInformationByHandle() failed */ + if (p_csverbose) + (void)EMSG(_("E626: cannot get cscope database information")); + return -1; + } + } + #endif + +*** ../vim-7.3.171/src/fileio.c 2011-04-11 21:35:03.000000000 +0200 +--- src/fileio.c 2011-05-05 16:22:22.000000000 +0200 +*************** +*** 6555,6560 **** +--- 6555,6575 ---- + use_tmp_file = TRUE; + } + #endif ++ #ifdef WIN3264 ++ { ++ BY_HANDLE_FILE_INFORMATION info1, info2; ++ ++ /* It's possible for the source and destination to be the same file. ++ * In that case go through a temp file name. This makes rename("foo", ++ * "./foo") a no-op (in a complicated way). */ ++ if (win32_fileinfo(from, &info1) == FILEINFO_OK ++ && win32_fileinfo(to, &info2) == FILEINFO_OK ++ && info1.dwVolumeSerialNumber == info2.dwVolumeSerialNumber ++ && info1.nFileIndexHigh == info2.nFileIndexHigh ++ && info1.nFileIndexLow == info2.nFileIndexLow) ++ use_tmp_file = TRUE; ++ } ++ #endif + + #if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME) + if (use_tmp_file) +*** ../vim-7.3.171/src/os_win32.c 2011-02-01 13:48:47.000000000 +0100 +--- src/os_win32.c 2011-05-05 16:24:17.000000000 +0200 +*************** +*** 2645,2669 **** + int + mch_is_linked(char_u *fname) + { + HANDLE hFile; +! int res = 0; +! BY_HANDLE_FILE_INFORMATION inf; + #ifdef FEAT_MBYTE + WCHAR *wn = NULL; + + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) + wn = enc_to_utf16(fname, NULL); + if (wn != NULL) + { + hFile = CreateFileW(wn, /* file name */ + GENERIC_READ, /* access mode */ +! 0, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! 0, /* file attributes */ + NULL); /* handle to template file */ + if (hFile == INVALID_HANDLE_VALUE +! && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + /* Retry with non-wide function (for Windows 98). */ + vim_free(wn); +--- 2645,2688 ---- + int + mch_is_linked(char_u *fname) + { ++ BY_HANDLE_FILE_INFORMATION info; ++ ++ return win32_fileinfo(fname, &info) == FILEINFO_OK ++ && info.nNumberOfLinks > 1; ++ } ++ ++ /* ++ * Get the by-handle-file-information for "fname". ++ * Returns FILEINFO_OK when OK. ++ * returns FILEINFO_ENC_FAIL when enc_to_utf16() failed. ++ * Returns FILEINFO_READ_FAIL when CreateFile() failed. ++ * Returns FILEINFO_INFO_FAIL when GetFileInformationByHandle() failed. ++ */ ++ int ++ win32_fileinfo(char_u *fname, BY_HANDLE_FILE_INFORMATION *info) ++ { + HANDLE hFile; +! int res = FILEINFO_READ_FAIL; + #ifdef FEAT_MBYTE + WCHAR *wn = NULL; + + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { + wn = enc_to_utf16(fname, NULL); ++ if (wn == NULL) ++ res = FILEINFO_ENC_FAIL; ++ } + if (wn != NULL) + { + hFile = CreateFileW(wn, /* file name */ + GENERIC_READ, /* access mode */ +! FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! FILE_FLAG_BACKUP_SEMANTICS, /* file attributes */ + NULL); /* handle to template file */ + if (hFile == INVALID_HANDLE_VALUE +! && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + /* Retry with non-wide function (for Windows 98). */ + vim_free(wn); +*************** +*** 2674,2690 **** + #endif + hFile = CreateFile(fname, /* file name */ + GENERIC_READ, /* access mode */ +! 0, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! 0, /* file attributes */ + NULL); /* handle to template file */ + + if (hFile != INVALID_HANDLE_VALUE) + { +! if (GetFileInformationByHandle(hFile, &inf) != 0 +! && inf.nNumberOfLinks > 1) +! res = 1; + CloseHandle(hFile); + } + +--- 2693,2710 ---- + #endif + hFile = CreateFile(fname, /* file name */ + GENERIC_READ, /* access mode */ +! FILE_SHARE_READ | FILE_SHARE_WRITE, /* share mode */ + NULL, /* security descriptor */ + OPEN_EXISTING, /* creation disposition */ +! FILE_FLAG_BACKUP_SEMANTICS, /* file attributes */ + NULL); /* handle to template file */ + + if (hFile != INVALID_HANDLE_VALUE) + { +! if (GetFileInformationByHandle(hFile, info) != 0) +! res = FILEINFO_OK; +! else +! res = FILEINFO_INFO_FAIL; + CloseHandle(hFile); + } + +*** ../vim-7.3.171/src/proto/os_win32.pro 2010-10-23 14:02:48.000000000 +0200 +--- src/proto/os_win32.pro 2011-05-05 16:17:42.000000000 +0200 +*************** +*** 21,26 **** +--- 21,27 ---- + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); + int mch_is_linked __ARGS((char_u *fname)); ++ int win32_fileinfo __ARGS((char_u *name, BY_HANDLE_FILE_INFORMATION *lpFileInfo)); + int mch_writable __ARGS((char_u *name)); + int mch_can_exe __ARGS((char_u *name)); + int mch_nodetype __ARGS((char_u *name)); +*** ../vim-7.3.171/src/vim.h 2011-04-11 21:35:03.000000000 +0200 +--- src/vim.h 2011-05-05 16:16:57.000000000 +0200 +*************** +*** 2217,2220 **** +--- 2217,2226 ---- + #define KEYLEN_PART_MAP -2 /* keylen value for incomplete mapping */ + #define KEYLEN_REMOVED 9999 /* keylen value for removed sequence */ + ++ /* Return values from win32_fileinfo(). */ ++ #define FILEINFO_OK 0 ++ #define FILEINFO_ENC_FAIL 1 /* enc_to_utf16() failed */ ++ #define FILEINFO_READ_FAIL 2 /* CreateFile() failed */ ++ #define FILEINFO_INFO_FAIL 3 /* GetFileInformationByHandle() failed */ ++ + #endif /* VIM__H */ +*** ../vim-7.3.171/src/version.c 2011-05-05 14:26:37.000000000 +0200 +--- src/version.c 2011-05-05 16:39:35.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 172, + /**/ + +-- +Q: What is a patch 22? +A: A patch you need to include to make it possible to include patches. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.173 b/source/ap/vim/patches/7.3.173 new file mode 100644 index 000000000..ac8cffb93 --- /dev/null +++ b/source/ap/vim/patches/7.3.173 @@ -0,0 +1,79 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.173 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.173 +Problem: After using setqflist() to make the quickfix list empty ":cwindow" + may open the window anyway. Also after ":vimgrep". +Solution: Correctly check whether the list is empty. (Ingo Karkat) +Files: src/quickfix.c + + +*** ../vim-7.3.172/src/quickfix.c 2011-04-28 17:27:05.000000000 +0200 +--- src/quickfix.c 2011-05-05 16:55:47.000000000 +0200 +*************** +*** 1164,1170 **** + + /* When no valid entries are present in the list, qf_ptr points to + * the first item in the list */ +! if (to_qfl->qf_nonevalid == TRUE) + to_qfl->qf_ptr = to_qfl->qf_start; + } + +--- 1164,1170 ---- + + /* When no valid entries are present in the list, qf_ptr points to + * the first item in the list */ +! if (to_qfl->qf_nonevalid) + to_qfl->qf_ptr = to_qfl->qf_start; + } + +*************** +*** 2243,2248 **** +--- 2243,2249 ---- + * it if we have errors; otherwise, leave it closed. + */ + if (qi->qf_lists[qi->qf_curlist].qf_nonevalid ++ || qi->qf_lists[qi->qf_curlist].qf_count == 0 + || qi->qf_curlist >= qi->qf_listcount) + { + if (win != NULL) +*************** +*** 3711,3717 **** + } + + if (qi->qf_lists[qi->qf_curlist].qf_index == 0) +! /* empty list or no valid entry */ + qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE; + else + qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE; +--- 3712,3718 ---- + } + + if (qi->qf_lists[qi->qf_curlist].qf_index == 0) +! /* no valid entry */ + qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE; + else + qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE; +*** ../vim-7.3.172/src/version.c 2011-05-05 16:41:19.000000000 +0200 +--- src/version.c 2011-05-05 17:11:57.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 173, + /**/ + +-- +"I can't complain, but sometimes I still do." (Joe Walsh) + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.174 b/source/ap/vim/patches/7.3.174 new file mode 100644 index 000000000..33d600350 --- /dev/null +++ b/source/ap/vim/patches/7.3.174 @@ -0,0 +1,109 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.174 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.174 +Problem: When Exuberant ctags binary is exctags it's not found. +Solution: Add configure check for exctags. (Hong Xu) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.173/src/configure.in 2011-02-09 17:42:53.000000000 +0100 +--- src/configure.in 2011-05-05 17:18:21.000000000 +0200 +*************** +*** 2619,2625 **** + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. + dnl Newer versions of ncurses are preferred over anything, except +! dnl when tinfo has been split off, it conains all we need. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). +--- 2619,2625 ---- + dnl On HP-UX 10.10 termcap or termlib should be used instead of + dnl curses, because curses is much slower. + dnl Newer versions of ncurses are preferred over anything, except +! dnl when tinfo has been split off, it contains all we need. + dnl Older versions of ncurses have bugs, get a new one! + dnl Digital Unix (OSF1) should use curses (Ronald Schild). + dnl On SCO Openserver should prefer termlib (Roger Cornelius). +*************** +*** 3370,3376 **** + AC_CHECK_LIB(xpg4, _xpg4_setrunelocale, [LIBS="$LIBS -lxpg4"],,) + + dnl Check how we can run ctags. Default to "ctags" when nothing works. +! dnl --version for Exuberant ctags (preferred) + dnl Add --fields=+S to get function signatures for omni completion. + dnl -t for typedefs (many ctags have this) + dnl -s for static functions (Elvis ctags only?) +--- 3370,3376 ---- + AC_CHECK_LIB(xpg4, _xpg4_setrunelocale, [LIBS="$LIBS -lxpg4"],,) + + dnl Check how we can run ctags. Default to "ctags" when nothing works. +! dnl Use --version to detect Exuberant ctags (preferred) + dnl Add --fields=+S to get function signatures for omni completion. + dnl -t for typedefs (many ctags have this) + dnl -s for static functions (Elvis ctags only?) +*************** +*** 3378,3384 **** + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +--- 3378,3386 ---- + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +*** ../vim-7.3.173/src/auto/configure 2011-02-09 17:42:53.000000000 +0100 +--- src/auto/configure 2011-05-05 17:19:26.000000000 +0200 +*************** +*** 12031,12037 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +--- 12031,12039 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" +*** ../vim-7.3.173/src/version.c 2011-05-05 17:14:07.000000000 +0200 +--- src/version.c 2011-05-05 17:19:37.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 174, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +54. You start tilting your head sideways to smile. :-) + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.175 b/source/ap/vim/patches/7.3.175 new file mode 100644 index 000000000..57fbc4a79 --- /dev/null +++ b/source/ap/vim/patches/7.3.175 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.175 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.175 +Problem: When 'colorcolumn' is set locally to a window, ":new" opens a + window with the same highlighting but 'colorcolumn' is empty. + (Tyru) +Solution: Call check_colorcolumn() after clearing and copying options. + (Christian Brabandt) +Files: src/buffer.c + + +*** ../vim-7.3.174/src/buffer.c 2011-04-11 16:56:29.000000000 +0200 +--- src/buffer.c 2011-05-05 17:28:24.000000000 +0200 +*************** +*** 2527,2532 **** +--- 2527,2535 ---- + if (p_fdls >= 0) + curwin->w_p_fdl = p_fdls; + #endif ++ #ifdef FEAT_SYN_HL ++ check_colorcolumn(curwin); ++ #endif + } + + /* +*** ../vim-7.3.174/src/version.c 2011-05-05 17:23:58.000000000 +0200 +--- src/version.c 2011-05-05 17:30:32.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 175, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +55. You ask your doctor to implant a gig in your brain. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.176 b/source/ap/vim/patches/7.3.176 new file mode 100644 index 000000000..fcf4880d2 --- /dev/null +++ b/source/ap/vim/patches/7.3.176 @@ -0,0 +1,165 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.176 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.176 +Problem: Ruby linking doesn't work properly on Mac OS X. +Solution: Fix the configure check for Ruby. (Bjorn Winckler) +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.175/src/configure.in 2011-05-05 17:23:58.000000000 +0200 +--- src/configure.in 2011-05-05 18:03:38.000000000 +0200 +*************** +*** 1387,1396 **** + AC_MSG_RESULT($enable_rubyinterp) + if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then + AC_MSG_CHECKING(--with-ruby-command argument) + AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)], +! RUBY_CMD="$withval"; AC_MSG_RESULT($RUBY_CMD), + RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD)) +- AC_SUBST(vi_cv_path_ruby) + AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) + if test "X$vi_cv_path_ruby" != "X"; then + AC_MSG_CHECKING(Ruby version) +--- 1387,1396 ---- + AC_MSG_RESULT($enable_rubyinterp) + if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then + AC_MSG_CHECKING(--with-ruby-command argument) ++ AC_SUBST(vi_cv_path_ruby) + AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)], +! RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; AC_MSG_RESULT($RUBY_CMD), + RUBY_CMD="ruby"; AC_MSG_RESULT(defaulting to $RUBY_CMD)) + AC_PATH_PROG(vi_cv_path_ruby, $RUBY_CMD) + if test "X$vi_cv_path_ruby" != "X"; then + AC_MSG_CHECKING(Ruby version) +*************** +*** 1412,1429 **** + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` +! if test -f "$rubyhdrdir/$librubyarg"; then +! librubyarg="$rubyhdrdir/$librubyarg" +! else +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` +! if test -f "$rubylibdir/$librubyarg"; then +! librubyarg="$rubylibdir/$librubyarg" +! elif test "$librubyarg" = "libruby.a"; then +! dnl required on Mac OS 10.3 where libruby.a doesn't exist +! librubyarg="-lruby" +! else +! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` +! fi + fi + + if test "X$librubyarg" != "X"; then +--- 1412,1426 ---- + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'` +! librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBY_A"]])'` +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'` +! if test -f "$rubylibdir/$librubya"; then +! librubyarg="$librubyarg" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" +! elif test "$librubyarg" = "libruby.a"; then +! dnl required on Mac OS 10.3 where libruby.a doesn't exist +! librubyarg="-lruby" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" + fi + + if test "X$librubyarg" != "X"; then +*** ../vim-7.3.175/src/auto/configure 2011-05-05 17:23:58.000000000 +0200 +--- src/auto/configure 2011-05-05 18:06:47.000000000 +0200 +*************** +*** 6218,6233 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5 + $as_echo_n "checking --with-ruby-command argument... " >&6; } + + # Check whether --with-ruby-command was given. + if test "${with_ruby_command+set}" = set; then : +! withval=$with_ruby_command; RUBY_CMD="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5 + $as_echo "$RUBY_CMD" >&6; } + else + RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5 + $as_echo "defaulting to $RUBY_CMD" >&6; } + fi + +- + # Extract the first word of "$RUBY_CMD", so it can be a program name with args. + set dummy $RUBY_CMD; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +--- 6218,6233 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5 + $as_echo_n "checking --with-ruby-command argument... " >&6; } + ++ + # Check whether --with-ruby-command was given. + if test "${with_ruby_command+set}" = set; then : +! withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5 + $as_echo "$RUBY_CMD" >&6; } + else + RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5 + $as_echo "defaulting to $RUBY_CMD" >&6; } + fi + + # Extract the first word of "$RUBY_CMD", so it can be a program name with args. + set dummy $RUBY_CMD; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +*************** +*** 6292,6308 **** + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` +! if test -f "$rubyhdrdir/$librubyarg"; then +! librubyarg="$rubyhdrdir/$librubyarg" +! else +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` +! if test -f "$rubylibdir/$librubyarg"; then +! librubyarg="$rubylibdir/$librubyarg" +! elif test "$librubyarg" = "libruby.a"; then +! librubyarg="-lruby" +! else +! librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"` +! fi + fi + + if test "X$librubyarg" != "X"; then +--- 6292,6305 ---- + RUBY_LIBS="$rubylibs" + fi + librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'` +! librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'` +! rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'` +! if test -f "$rubylibdir/$librubya"; then +! librubyarg="$librubyarg" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" +! elif test "$librubyarg" = "libruby.a"; then +! librubyarg="-lruby" +! RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" + fi + + if test "X$librubyarg" != "X"; then +*** ../vim-7.3.175/src/version.c 2011-05-05 17:32:40.000000000 +0200 +--- src/version.c 2011-05-05 18:08:52.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 176, + /**/ + +-- +"I simultaneously try to keep my head in the clouds and my feet on the +ground. Sometimes it's a stretch, though." -- Larry Wall + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.177 b/source/ap/vim/patches/7.3.177 new file mode 100644 index 000000000..895b3b134 --- /dev/null +++ b/source/ap/vim/patches/7.3.177 @@ -0,0 +1,97 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.177 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.177 +Problem: MS-Windows: mkdir() doesn't work properly when 'encoding' is + "utf-8". +Solution: Convert to utf-16. (Yukihiro Nakadaira) +Files: src/os_win32.c, src/os_win32.h, src/proto/os_win32.pro + + +*** ../vim-7.3.176/src/os_win32.c 2011-05-05 16:41:19.000000000 +0200 +--- src/os_win32.c 2011-05-05 18:24:36.000000000 +0200 +*************** +*** 2640,2645 **** +--- 2640,2669 ---- + } + + /* ++ * Create directory "name". ++ * Return 0 on success, -1 on error. ++ */ ++ int ++ mch_mkdir(char_u *name) ++ { ++ #ifdef FEAT_MBYTE ++ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) ++ { ++ WCHAR *p; ++ int retval; ++ ++ p = enc_to_utf16(name, NULL); ++ if (p == NULL) ++ return -1; ++ retval = _wmkdir(p); ++ vim_free(p); ++ return retval; ++ } ++ #endif ++ return _mkdir(name); ++ } ++ ++ /* + * Return TRUE if file "fname" has more than one link. + */ + int +*** ../vim-7.3.176/src/os_win32.h 2010-08-15 21:57:30.000000000 +0200 +--- src/os_win32.h 2011-05-05 18:25:44.000000000 +0200 +*************** +*** 191,195 **** + #ifdef __BORLANDC__ + # define vim_mkdir(x, y) mkdir(x) + #else +! # define vim_mkdir(x, y) _mkdir(x) + #endif +--- 191,195 ---- + #ifdef __BORLANDC__ + # define vim_mkdir(x, y) mkdir(x) + #else +! # define vim_mkdir(x, y) mch_mkdir(x) + #endif +*** ../vim-7.3.176/src/proto/os_win32.pro 2011-05-05 16:41:19.000000000 +0200 +--- src/proto/os_win32.pro 2011-05-05 18:26:20.000000000 +0200 +*************** +*** 20,25 **** +--- 20,26 ---- + int mch_setperm __ARGS((char_u *name, long perm)); + void mch_hide __ARGS((char_u *name)); + int mch_isdir __ARGS((char_u *name)); ++ int mch_mkdir __ARGS((char_u *name)); + int mch_is_linked __ARGS((char_u *fname)); + int win32_fileinfo __ARGS((char_u *name, BY_HANDLE_FILE_INFORMATION *lpFileInfo)); + int mch_writable __ARGS((char_u *name)); +*** ../vim-7.3.176/src/version.c 2011-05-05 18:10:11.000000000 +0200 +--- src/version.c 2011-05-05 18:27:56.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 177, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +56. You leave the modem speaker on after connecting because you think it + sounds like the ocean wind...the perfect soundtrack for "surfing the net". + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.178 b/source/ap/vim/patches/7.3.178 new file mode 100644 index 000000000..9b6ca7c3a --- /dev/null +++ b/source/ap/vim/patches/7.3.178 @@ -0,0 +1,163 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.178 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.178 +Problem: C-indent doesn't handle code right after { correctly. +Solution: Fix detecting unterminated line. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.177/src/misc1.c 2011-04-28 17:48:39.000000000 +0200 +--- src/misc1.c 2011-05-10 11:35:09.000000000 +0200 +*************** +*** 4983,4989 **** + } + + /* +! * Return TRUE if there there is no code at *s. White space and comments are + * not considered code. + */ + static int +--- 4983,4989 ---- + } + + /* +! * Return TRUE if there is no code at *s. White space and comments are + * not considered code. + */ + static int +*************** +*** 5458,5465 **** + } + + /* +! * Recognize a line that starts with '{' or '}', or ends with ';', '{' or '}'. + * Don't consider "} else" a terminated line. + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +--- 5458,5468 ---- + } + + /* +! * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or +! * '}'. + * Don't consider "} else" a terminated line. ++ * Don't consider a line where there are unmatched opening braces before '}', ++ * ';' or ',' a terminated line. + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +*************** +*** 5470,5475 **** +--- 5473,5479 ---- + int incl_comma; /* recognize a trailing comma */ + { + char_u found_start = 0; ++ unsigned n_open = 0; + + s = cin_skipcomment(s); + +*************** +*** 5480,5489 **** + { + /* skip over comments, "" strings and 'c'haracters */ + s = skip_string(cin_skipcomment(s)); +! if ((*s == ';' || (incl_open && *s == '{') || *s == '}' +! || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; + + if (*s) + s++; +--- 5484,5502 ---- + { + /* skip over comments, "" strings and 'c'haracters */ + s = skip_string(cin_skipcomment(s)); +! if (*s == '}' && n_open > 0) +! --n_open; +! if (n_open == 0 +! && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; ++ else if (*s == '{') ++ { ++ if (incl_open && cin_nocode(s + 1)) ++ return *s; ++ else ++ ++n_open; ++ } + + if (*s) + s++; +*** ../vim-7.3.177/src/testdir/test3.in 2011-04-28 13:01:59.000000000 +0200 +--- src/testdir/test3.in 2011-05-10 11:34:13.000000000 +0200 +*************** +*** 1344,1349 **** +--- 1344,1365 ---- + } + + STARTTEST ++ :set cino& ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ if(x==y) ++ if(y==z) ++ foo=1; ++ else { bar=1; ++ baz=2; ++ } ++ printf("Foo!\n"); ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.177/src/testdir/test3.ok 2011-04-28 13:01:59.000000000 +0200 +--- src/testdir/test3.ok 2011-05-10 11:34:13.000000000 +0200 +*************** +*** 1204,1206 **** +--- 1204,1218 ---- + { + } + ++ ++ void func(void) ++ { ++ if(x==y) ++ if(y==z) ++ foo=1; ++ else { bar=1; ++ baz=2; ++ } ++ printf("Foo!\n"); ++ } ++ +*** ../vim-7.3.177/src/version.c 2011-05-05 18:31:54.000000000 +0200 +--- src/version.c 2011-05-10 11:37:43.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 178, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +69. Yahoo welcomes you with your own start page + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.179 b/source/ap/vim/patches/7.3.179 new file mode 100644 index 000000000..f175b264e --- /dev/null +++ b/source/ap/vim/patches/7.3.179 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.179 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.179 +Problem: C-indent doesn't handle colon in string correctly. +Solution: Skip the string. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.178/src/misc1.c 2011-05-10 11:39:13.000000000 +0200 +--- src/misc1.c 2011-05-10 11:50:14.000000000 +0200 +*************** +*** 5801,5807 **** + continue; + } + +! if (s[0] == ':') + { + if (s[1] == ':') + { +--- 5801,5809 ---- + continue; + } + +! if (s[0] == '"') +! s = skip_string(s) + 1; +! else if (s[0] == ':') + { + if (s[1] == ':') + { +*** ../vim-7.3.178/src/testdir/test3.in 2011-05-10 11:39:13.000000000 +0200 +--- src/testdir/test3.in 2011-05-10 11:53:02.000000000 +0200 +*************** +*** 1360,1365 **** +--- 1360,1378 ---- + } + + STARTTEST ++ :set cino& ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ cout << "a" ++ << "b" ++ << ") :" ++ << "c"; ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.178/src/testdir/test3.ok 2011-05-10 11:39:13.000000000 +0200 +--- src/testdir/test3.ok 2011-05-10 11:50:14.000000000 +0200 +*************** +*** 1216,1218 **** +--- 1216,1227 ---- + printf("Foo!\n"); + } + ++ ++ void func(void) ++ { ++ cout << "a" ++ << "b" ++ << ") :" ++ << "c"; ++ } ++ +*** ../vim-7.3.178/src/version.c 2011-05-10 11:39:13.000000000 +0200 +--- src/version.c 2011-05-10 11:53:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 179, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +71. You wonder how people walk + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.180 b/source/ap/vim/patches/7.3.180 new file mode 100644 index 000000000..5997bfbe8 --- /dev/null +++ b/source/ap/vim/patches/7.3.180 @@ -0,0 +1,295 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.180 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.180 +Problem: When both a middle part of 'comments' matches and an end part, the + middle part was used errornously. +Solution: After finding the middle part match continue looking for a better + end part match. (partly by Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.179/src/misc1.c 2011-05-10 11:56:26.000000000 +0200 +--- src/misc1.c 2011-05-10 13:24:38.000000000 +0200 +*************** +*** 1561,1566 **** +--- 1561,1569 ---- + char_u part_buf[COM_MAX_LEN]; /* buffer for one option part */ + char_u *string; /* pointer to comment string */ + char_u *list; ++ int middle_match_len = 0; ++ char_u *prev_list; ++ char_u *saved_flags; + + i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ +*************** +*** 1569,1575 **** + /* + * Repeat to match several nested comment strings. + */ +! while (line[i]) + { + /* + * scan through the 'comments' option for a match +--- 1572,1578 ---- + /* + * Repeat to match several nested comment strings. + */ +! while (line[i] != NUL) + { + /* + * scan through the 'comments' option for a match +*************** +*** 1577,1658 **** + found_one = FALSE; + for (list = curbuf->b_p_com; *list; ) + { +! /* +! * Get one option part into part_buf[]. Advance list to next one. +! * put string at start of string. +! */ +! if (!got_com && flags != NULL) /* remember where flags started */ +! *flags = list; + (void)copy_option_part(&list, part_buf, COM_MAX_LEN, ","); + string = vim_strchr(part_buf, ':'); + if (string == NULL) /* missing ':', ignore this part */ + continue; + *string++ = NUL; /* isolate flags from string */ + +! /* +! * When already found a nested comment, only accept further +! * nested comments. +! */ + if (got_com && vim_strchr(part_buf, COM_NEST) == NULL) + continue; + +! /* When 'O' flag used don't use for "O" command */ + if (backward && vim_strchr(part_buf, COM_NOBACK) != NULL) + continue; + +! /* +! * Line contents and string must match. + * When string starts with white space, must have some white space + * (but the amount does not need to match, there might be a mix of +! * TABs and spaces). +! */ + if (vim_iswhite(string[0])) + { + if (i == 0 || !vim_iswhite(line[i - 1])) +! continue; + while (vim_iswhite(string[0])) + ++string; + } + for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j) + ; + if (string[j] != NUL) +! continue; + +! /* +! * When 'b' flag used, there must be white space or an +! * end-of-line after the string in the line. +! */ + if (vim_strchr(part_buf, COM_BLANK) != NULL + && !vim_iswhite(line[i + j]) && line[i + j] != NUL) + continue; + +! /* +! * We have found a match, stop searching. +! */ +! i += j; +! got_com = TRUE; + found_one = TRUE; + break; + } + +! /* +! * No match found, stop scanning. +! */ + if (!found_one) + break; + +! /* +! * Include any trailing white space. +! */ + while (vim_iswhite(line[i])) + ++i; + +! /* +! * If this comment doesn't nest, stop here. +! */ + if (vim_strchr(part_buf, COM_NEST) == NULL) + break; + } + return (got_com ? i : 0); + } + #endif +--- 1580,1683 ---- + found_one = FALSE; + for (list = curbuf->b_p_com; *list; ) + { +! /* Get one option part into part_buf[]. Advance "list" to next +! * one. Put "string" at start of string. */ +! if (!got_com && flags != NULL) +! *flags = list; /* remember where flags started */ +! prev_list = list; + (void)copy_option_part(&list, part_buf, COM_MAX_LEN, ","); + string = vim_strchr(part_buf, ':'); + if (string == NULL) /* missing ':', ignore this part */ + continue; + *string++ = NUL; /* isolate flags from string */ + +! /* If we found a middle match previously, use that match when this +! * is not a middle or end. */ +! if (middle_match_len != 0 +! && vim_strchr(part_buf, COM_MIDDLE) == NULL +! && vim_strchr(part_buf, COM_END) == NULL) +! break; +! +! /* When we already found a nested comment, only accept further +! * nested comments. */ + if (got_com && vim_strchr(part_buf, COM_NEST) == NULL) + continue; + +! /* When 'O' flag present and using "O" command skip this one. */ + if (backward && vim_strchr(part_buf, COM_NOBACK) != NULL) + continue; + +! /* Line contents and string must match. + * When string starts with white space, must have some white space + * (but the amount does not need to match, there might be a mix of +! * TABs and spaces). */ + if (vim_iswhite(string[0])) + { + if (i == 0 || !vim_iswhite(line[i - 1])) +! continue; /* missing shite space */ + while (vim_iswhite(string[0])) + ++string; + } + for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j) + ; + if (string[j] != NUL) +! continue; /* string doesn't match */ + +! /* When 'b' flag used, there must be white space or an +! * end-of-line after the string in the line. */ + if (vim_strchr(part_buf, COM_BLANK) != NULL + && !vim_iswhite(line[i + j]) && line[i + j] != NUL) + continue; + +! /* We have found a match, stop searching unless this is a middle +! * comment. The middle comment can be a substring of the end +! * comment in which case it's better to return the length of the +! * end comment and its flags. Thus we keep searching with middle +! * and end matches and use an end match if it matches better. */ +! if (vim_strchr(part_buf, COM_MIDDLE) != NULL) +! { +! if (middle_match_len == 0) +! { +! middle_match_len = j; +! saved_flags = prev_list; +! } +! continue; +! } +! if (middle_match_len != 0 && j > middle_match_len) +! /* Use this match instead of the middle match, since it's a +! * longer thus better match. */ +! middle_match_len = 0; +! +! if (middle_match_len == 0) +! i += j; + found_one = TRUE; + break; + } + +! if (middle_match_len != 0) +! { +! /* Use the previously found middle match after failing to find a +! * match with an end. */ +! if (!got_com && flags != NULL) +! *flags = saved_flags; +! i += middle_match_len; +! found_one = TRUE; +! } +! +! /* No match found, stop scanning. */ + if (!found_one) + break; + +! /* Include any trailing white space. */ + while (vim_iswhite(line[i])) + ++i; + +! /* If this comment doesn't nest, stop here. */ +! got_com = TRUE; + if (vim_strchr(part_buf, COM_NEST) == NULL) + break; + } ++ + return (got_com ? i : 0); + } + #endif +*** ../vim-7.3.179/src/testdir/test3.in 2011-05-10 11:56:26.000000000 +0200 +--- src/testdir/test3.in 2011-05-10 12:05:50.000000000 +0200 +*************** +*** 1373,1378 **** +--- 1373,1390 ---- + } + + STARTTEST ++ :set com=s1:/*,m:*,ex:*/ ++ ]]3jofoo(); ++ ENDTEST ++ ++ void func(void) ++ { ++ /* ++ * This is a comment. ++ */ ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.179/src/testdir/test3.ok 2011-05-10 11:56:26.000000000 +0200 +--- src/testdir/test3.ok 2011-05-10 12:05:50.000000000 +0200 +*************** +*** 1225,1227 **** +--- 1225,1236 ---- + << "c"; + } + ++ ++ void func(void) ++ { ++ /* ++ * This is a comment. ++ */ ++ foo(); ++ } ++ +*** ../vim-7.3.179/src/version.c 2011-05-10 11:56:26.000000000 +0200 +--- src/version.c 2011-05-10 13:37:28.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 180, + /**/ + +-- +"Thou shalt not follow the Null Pointer, for at its end Chaos and +Madness lie." + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.181 b/source/ap/vim/patches/7.3.181 new file mode 100644 index 000000000..3151d4455 --- /dev/null +++ b/source/ap/vim/patches/7.3.181 @@ -0,0 +1,171 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.181 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.181 +Problem: When repeating the insert of CTRL-V or a digraph the display may + not be updated correctly. +Solution: Only call edit_unputchar() after edit_putchar(). (Lech Lorens) +Files: src/edit.c + + +*** ../vim-7.3.180/src/edit.c 2010-11-10 17:11:29.000000000 +0100 +--- src/edit.c 2011-05-10 14:16:41.000000000 +0200 +*************** +*** 1553,1564 **** +--- 1553,1568 ---- + ins_ctrl_v() + { + int c; ++ int did_putchar = FALSE; + + /* may need to redraw when no more chars available now */ + ins_redraw(FALSE); + + if (redrawing() && !char_avail()) ++ { + edit_putchar('^', TRUE); ++ did_putchar = TRUE; ++ } + AppendToRedobuff((char_u *)CTRL_V_STR); /* CTRL-V */ + + #ifdef FEAT_CMDL_INFO +*************** +*** 1566,1573 **** + #endif + + c = get_literal(); +! edit_unputchar(); /* when line fits in 'columns' the '^' is at the start +! of the next line and will not be redrawn */ + #ifdef FEAT_CMDL_INFO + clear_showcmd(); + #endif +--- 1570,1579 ---- + #endif + + c = get_literal(); +! if (did_putchar) +! /* when the line fits in 'columns' the '^' is at the start of the next +! * line and will not removed by the redraw */ +! edit_unputchar(); + #ifdef FEAT_CMDL_INFO + clear_showcmd(); + #endif +*************** +*** 9637,9642 **** +--- 9643,9649 ---- + { + int c; + int cc; ++ int did_putchar = FALSE; + + pc_status = PC_STATUS_UNSET; + if (redrawing() && !char_avail()) +*************** +*** 9645,9650 **** +--- 9652,9658 ---- + ins_redraw(FALSE); + + edit_putchar('?', TRUE); ++ did_putchar = TRUE; + #ifdef FEAT_CMDL_INFO + add_to_showcmd_c(Ctrl_K); + #endif +*************** +*** 9661,9668 **** + c = plain_vgetc(); + --no_mapping; + --allow_keys; +! edit_unputchar(); /* when line fits in 'columns' the '?' is at the start +! of the next line and will not be redrawn */ + + if (IS_SPECIAL(c) || mod_mask) /* special key */ + { +--- 9669,9678 ---- + c = plain_vgetc(); + --no_mapping; + --allow_keys; +! if (did_putchar) +! /* when the line fits in 'columns' the '?' is at the start of the next +! * line and will not be removed by the redraw */ +! edit_unputchar(); + + if (IS_SPECIAL(c) || mod_mask) /* special key */ + { +*************** +*** 9674,9679 **** +--- 9684,9690 ---- + } + if (c != ESC) + { ++ did_putchar = FALSE; + if (redrawing() && !char_avail()) + { + /* may need to redraw when no more chars available now */ +*************** +*** 9681,9691 **** + + if (char2cells(c) == 1) + { +- /* first remove the '?', otherwise it's restored when typing +- * an ESC next */ +- edit_unputchar(); + ins_redraw(FALSE); + edit_putchar(c, TRUE); + } + #ifdef FEAT_CMDL_INFO + add_to_showcmd_c(c); +--- 9692,9700 ---- + + if (char2cells(c) == 1) + { + ins_redraw(FALSE); + edit_putchar(c, TRUE); ++ did_putchar = TRUE; + } + #ifdef FEAT_CMDL_INFO + add_to_showcmd_c(c); +*************** +*** 9696,9703 **** + cc = plain_vgetc(); + --no_mapping; + --allow_keys; +! edit_unputchar(); /* when line fits in 'columns' the '?' is at the +! start of the next line and will not be redrawn */ + if (cc != ESC) + { + AppendToRedobuff((char_u *)CTRL_V_STR); +--- 9705,9714 ---- + cc = plain_vgetc(); + --no_mapping; + --allow_keys; +! if (did_putchar) +! /* when the line fits in 'columns' the '?' is at the start of the +! * next line and will not be removed by a redraw */ +! edit_unputchar(); + if (cc != ESC) + { + AppendToRedobuff((char_u *)CTRL_V_STR); +*** ../vim-7.3.180/src/version.c 2011-05-10 13:38:23.000000000 +0200 +--- src/version.c 2011-05-10 14:20:40.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 181, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +74. Your most erotic dreams are about cybersex + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.182 b/source/ap/vim/patches/7.3.182 new file mode 100644 index 000000000..509b68b54 --- /dev/null +++ b/source/ap/vim/patches/7.3.182 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.182 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.182 (after 7.3.180) +Problem: Compiler warning for uninitialized variable. +Solution: Add dummy initializer. +Files: src/misc1.c + + +*** ../vim-7.3.181/src/misc1.c 2011-05-10 13:38:23.000000000 +0200 +--- src/misc1.c 2011-05-10 14:37:39.000000000 +0200 +*************** +*** 1563,1569 **** + char_u *list; + int middle_match_len = 0; + char_u *prev_list; +! char_u *saved_flags; + + i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ +--- 1563,1569 ---- + char_u *list; + int middle_match_len = 0; + char_u *prev_list; +! char_u *saved_flags = NULL; + + i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ +*** ../vim-7.3.181/src/version.c 2011-05-10 14:22:10.000000000 +0200 +--- src/version.c 2011-05-10 14:38:39.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 182, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +75. You start wondering whether you could actually upgrade your brain + with a Pentium Pro microprocessor 80. The upgrade works just fine. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.183 b/source/ap/vim/patches/7.3.183 new file mode 100644 index 000000000..23178c0b5 --- /dev/null +++ b/source/ap/vim/patches/7.3.183 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.183 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.183 (after 7.3.174) +Problem: When Exuberant ctags binary is exuberant-ctags it's not found. +Solution: Add configure check for exuberant-ctags. +Files: src/configure.in, src/auto/configure + + +*** ../vim-7.3.182/src/configure.in 2011-05-05 18:10:11.000000000 +0200 +--- src/configure.in 2011-05-10 15:39:38.000000000 +0200 +*************** +*** 3375,3384 **** + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" +--- 3375,3386 ---- + dnl -i+m to test for older Exuberant ctags + AC_MSG_CHECKING(how to create tags) + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" ++ elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then ++ TAGPRG="exctags -I INIT+ --fields=+S" ++ elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&AC_FD_CC 2>&1; then ++ TAGPRG="exuberant-ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&AC_FD_CC 2>&1 && TAGPRG="etags" +*** ../vim-7.3.182/src/auto/configure 2011-05-05 18:10:11.000000000 +0200 +--- src/auto/configure 2011-05-10 15:39:41.000000000 +0200 +*************** +*** 12028,12037 **** + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then +! TAGPRG="exctags -I INIT+ --fields=+S" +! elif (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags" +--- 12028,12039 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5 + $as_echo_n "checking how to create tags... " >&6; } + test -f tags && mv tags tags.save +! if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then + TAGPRG="ctags -I INIT+ --fields=+S" ++ elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then ++ TAGPRG="exctags -I INIT+ --fields=+S" ++ elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then ++ TAGPRG="exuberant-ctags -I INIT+ --fields=+S" + else + TAGPRG="ctags" + (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags" +*** ../vim-7.3.182/src/version.c 2011-05-10 14:44:07.000000000 +0200 +--- src/version.c 2011-05-10 15:40:48.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 183, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +78. You find yourself dialing IP numbers on the phone. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.184 b/source/ap/vim/patches/7.3.184 new file mode 100644 index 000000000..3b0cfc692 --- /dev/null +++ b/source/ap/vim/patches/7.3.184 @@ -0,0 +1,86 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.184 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.184 +Problem: Static code analysis errors in riscOS. +Solution: Make buffer size bigger. (Dominique Pelle) +Files: src/gui_riscos.c + + +*** ../vim-7.3.183/src/gui_riscos.c 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_riscos.c 2011-05-10 15:49:56.000000000 +0200 +*************** +*** 1756,1762 **** + + if (button & 0x444) + { +! int front_block[10]; + /* Dragging with Select - bring window to front first */ + front_block[0] = gui.window_handle; + swi(Wimp_GetWindowState, 0, front_block); +--- 1756,1762 ---- + + if (button & 0x444) + { +! int front_block[64]; + /* Dragging with Select - bring window to front first */ + front_block[0] = gui.window_handle; + swi(Wimp_GetWindowState, 0, front_block); +*************** +*** 1874,1880 **** + + if (ro_dragging == DRAG_RESIZE_WINDOW) + { +! /* Resizeing the main window. */ + block[2] = y; + block[3] = x; + ro_open_main(block); +--- 1874,1880 ---- + + if (ro_dragging == DRAG_RESIZE_WINDOW) + { +! /* Resizing the main window. */ + block[2] = y; + block[3] = x; + ro_open_main(block); +*************** +*** 2651,2657 **** + long_u length; + + block[0] = 48; /* Size of block. */ +! block[3] = 0; /* Orinial message. */ + block[4] = 0x10; /* Data request. */ + block[5] = gui.window_handle; + block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ +--- 2651,2657 ---- + long_u length; + + block[0] = 48; /* Size of block. */ +! block[3] = 0; /* Original message. */ + block[4] = 0x10; /* Data request. */ + block[5] = gui.window_handle; + block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ +*** ../vim-7.3.183/src/version.c 2011-05-10 15:41:59.000000000 +0200 +--- src/version.c 2011-05-10 15:51:29.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 184, + /**/ + +-- +If bankers can count, how come they have eight windows and +only four tellers? + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.185 b/source/ap/vim/patches/7.3.185 new file mode 100644 index 000000000..7b3ed1899 --- /dev/null +++ b/source/ap/vim/patches/7.3.185 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.185 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.185 +Problem: ":windo g/pattern/q" closes windows and reports "N more lines". + (Tim Chase) +Solution: Remember what buffer ":global" started in. (Jean-Rene David) +Files: src/ex_cmds.c + + +*** ../vim-7.3.184/src/ex_cmds.c 2011-04-11 21:35:03.000000000 +0200 +--- src/ex_cmds.c 2011-05-10 15:58:48.000000000 +0200 +*************** +*** 5365,5372 **** + global_exe(cmd) + char_u *cmd; + { +! linenr_T old_lcount; /* b_ml.ml_line_count before the command */ +! linenr_T lnum; /* line number according to old situation */ + + /* + * Set current position only once for a global command. +--- 5365,5373 ---- + global_exe(cmd) + char_u *cmd; + { +! linenr_T old_lcount; /* b_ml.ml_line_count before the command */ +! buf_T *old_buf = curbuf; /* remember what buffer we started in */ +! linenr_T lnum; /* line number according to old situation */ + + /* + * Set current position only once for a global command. +*************** +*** 5410,5417 **** + msg_didout = FALSE; + + /* If substitutes done, report number of substitutes, otherwise report +! * number of extra or deleted lines. */ +! if (!do_sub_msg(FALSE)) + msgmore(curbuf->b_ml.ml_line_count - old_lcount); + } + +--- 5411,5420 ---- + msg_didout = FALSE; + + /* If substitutes done, report number of substitutes, otherwise report +! * number of extra or deleted lines. +! * Don't report extra or deleted lines in the edge case where the buffer +! * we are in after execution is different from the buffer we started in. */ +! if (!do_sub_msg(FALSE) && curbuf == old_buf) + msgmore(curbuf->b_ml.ml_line_count - old_lcount); + } + +*** ../vim-7.3.184/src/version.c 2011-05-10 15:52:10.000000000 +0200 +--- src/version.c 2011-05-10 15:57:40.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 185, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +79. All of your most erotic dreams have a scrollbar at the right side. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.186 b/source/ap/vim/patches/7.3.186 new file mode 100644 index 000000000..d834c370d --- /dev/null +++ b/source/ap/vim/patches/7.3.186 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.186 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.186 +Problem: When 'clipboard' contains "unnamed" or "unnamedplus" the value of + v:register is wrong for operators without a specific register. +Solution: Adjust the register according to 'clipboard'. (Ingo Karkat) +Files: src/normal.c + + +*** ../vim-7.3.185/src/normal.c 2010-12-17 18:52:56.000000000 +0100 +--- src/normal.c 2011-05-10 16:07:49.000000000 +0200 +*************** +*** 1202,1208 **** + { + clearop(oap); + #ifdef FEAT_EVAL +! set_reg_var('"'); + #endif + } + +--- 1202,1214 ---- + { + clearop(oap); + #ifdef FEAT_EVAL +! { +! int regname = 0; +! /* Adjust the register according to 'clipboard', so that when +! * "unnamed" is present it becomes '*' or '+' instead of '"'. */ +! adjust_clip_reg(®name); +! set_reg_var(regname); +! } + #endif + } + +*** ../vim-7.3.185/src/version.c 2011-05-10 16:00:43.000000000 +0200 +--- src/version.c 2011-05-10 16:10:10.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 186, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +80. At parties, you introduce your spouse as your "service provider." + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.187 b/source/ap/vim/patches/7.3.187 new file mode 100644 index 000000000..7bf82ce4d --- /dev/null +++ b/source/ap/vim/patches/7.3.187 @@ -0,0 +1,6621 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.187 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.187 +Problem: The RISC OS port has obvious errors and is not being maintained. +Solution: Remove the RISC OS files and code. +Files: src/ascii.h, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/fileio.c, src/globals.h, src/gui.c, src/gui.h, + src/main.c, src/memfile.c, src/memline.c, src/misc1.c, + src/proto.h, src/quickfix.c, src/search.c, src/structs.h, + src/term.c, src/termlib.c, src/version.c, src/vim.h, + src/gui_riscos.h, src/os_riscos.h, src/gui_riscos.c, + src/os_riscos.c, runtime/doc/os_risc.txt + + +*** ../vim-7.3.186/src/ascii.h 2010-08-15 21:57:25.000000000 +0200 +--- src/ascii.h 2011-05-10 16:22:08.000000000 +0200 +*************** +*** 183,193 **** + # define PATHSEP psepc + # define PATHSEPSTR pseps + #else +! # ifdef RISCOS +! # define PATHSEP '.' +! # define PATHSEPSTR "." +! # else +! # define PATHSEP '/' +! # define PATHSEPSTR "/" +! # endif + #endif +--- 183,188 ---- + # define PATHSEP psepc + # define PATHSEPSTR pseps + #else +! # define PATHSEP '/' +! # define PATHSEPSTR "/" + #endif +*** ../vim-7.3.186/src/eval.c 2011-04-21 14:27:21.000000000 +0200 +--- src/eval.c 2011-05-10 16:22:21.000000000 +0200 +*************** +*** 11818,11826 **** + #ifdef __QNX__ + "qnx", + #endif +- #ifdef RISCOS +- "riscos", +- #endif + #ifdef UNIX + "unix", + #endif +--- 11818,11823 ---- +*** ../vim-7.3.186/src/ex_cmds.c 2011-05-10 16:00:43.000000000 +0200 +--- src/ex_cmds.c 2011-05-10 16:23:22.000000000 +0200 +*************** +*** 899,907 **** + * Handle the ":!cmd" command. Also for ":r !cmd" and ":w !cmd" + * Bangs in the argument are replaced with the previously entered command. + * Remember the argument. +- * +- * RISCOS: Bangs only replaced when followed by a space, since many +- * pathnames contain one. + */ + void + do_bang(addr_count, eap, forceit, do_in, do_out) +--- 899,904 ---- +*************** +*** 980,990 **** + trailarg = NULL; + while (*p) + { +! if (*p == '!' +! #ifdef RISCOS +! && (p[1] == ' ' || p[1] == NUL) +! #endif +! ) + { + if (p > newcmd && p[-1] == '\\') + STRMOVE(p - 1, p); +--- 977,983 ---- + trailarg = NULL; + while (*p) + { +! if (*p == '!') + { + if (p > newcmd && p[-1] == '\\') + STRMOVE(p - 1, p); +*************** +*** 1578,1591 **** + if (p != NULL) + *p = NUL; + } +- # ifdef RISCOS +- STRCAT(buf, " { < "); /* Use RISC OS notation for input. */ +- STRCAT(buf, itmp); +- STRCAT(buf, " } "); +- # else + STRCAT(buf, " <"); /* " < " causes problems on Amiga */ + STRCAT(buf, itmp); +- # endif + if (*p_shq == NUL) + { + p = vim_strchr(cmd, '|'); +--- 1571,1578 ---- +*************** +*** 1634,1649 **** + else + vim_snprintf((char *)end, (size_t)(buflen - (end - buf)), + #ifdef FEAT_QUICKFIX +- # ifndef RISCOS +- opt != p_sp ? " %s%s" : +- # endif + " %s %s", + #else +- # ifndef RISCOS + " %s%s", /* " > %s" causes problems on Amiga */ +- # else +- " %s %s", /* But is needed for 'shellpipe' and RISC OS */ +- # endif + #endif + (char *)opt, (char *)fname); + } +--- 1621,1629 ---- +*************** +*** 1844,1854 **** + #ifdef VMS + (char_u *)"-tmp", + #else +- # ifdef RISCOS +- (char_u *)"/tmp", +- # else + (char_u *)".tmp", +- # endif + #endif + FALSE); + if (tempname == NULL) /* out of memory */ +--- 1824,1830 ---- +*** ../vim-7.3.186/src/ex_cmds2.c 2011-04-11 21:35:03.000000000 +0200 +--- src/ex_cmds2.c 2011-05-10 16:23:47.000000000 +0200 +*************** +*** 500,517 **** + /* Expand the file name in the same way as do_source(). This means + * doing it twice, so that $DIR/file gets expanded when $DIR is + * "~/dir". */ +- #ifdef RISCOS +- q = mch_munge_fname(p); +- #else + q = expand_env_save(p); +- #endif + if (q == NULL) + return FAIL; +- #ifdef RISCOS +- p = mch_munge_fname(q); +- #else + p = expand_env_save(q); +- #endif + vim_free(q); + if (p == NULL) + return FAIL; +--- 500,509 ---- +*************** +*** 2940,2950 **** + proftime_T wait_start; + #endif + +- #ifdef RISCOS +- p = mch_munge_fname(fname); +- #else + p = expand_env_save(fname); +- #endif + if (p == NULL) + return retval; + fname_exp = fix_fname(p); +--- 2932,2938 ---- +*** ../vim-7.3.186/src/ex_docmd.c 2011-05-05 14:26:37.000000000 +0200 +--- src/ex_docmd.c 2011-05-10 16:24:18.000000000 +0200 +*************** +*** 9702,9715 **** + valid = 0; /* Must have ":p:h" to be valid */ + } + else +- #ifdef RISCOS +- /* Always use the full path for RISC OS if possible. */ +- result = curbuf->b_ffname; +- if (result == NULL) +- result = curbuf->b_fname; +- #else + result = curbuf->b_fname; +- #endif + break; + + case SPEC_HASH: /* '#' or "#99": alternate file */ +--- 9702,9708 ---- +*************** +*** 9854,9864 **** + if (src[*usedlen] == '<') /* remove the file name extension */ + { + ++*usedlen; +- #ifdef RISCOS +- if ((s = vim_strrchr(result, '/')) != NULL && s >= gettail(result)) +- #else + if ((s = vim_strrchr(result, '.')) != NULL && s >= gettail(result)) +- #endif + resultlen = (int)(s - result); + } + #ifdef FEAT_MODIFY_FNAME +--- 9847,9853 ---- +*************** +*** 10875,10882 **** + else if (vim_ispathsep(*p)) + { + *s++ = '='; +! #if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) || defined(RISCOS) \ +! || defined(VMS) + if (*p == ':') + *s++ = '-'; + else +--- 10864,10870 ---- + else if (vim_ispathsep(*p)) + { + *s++ = '='; +! #if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) || defined(VMS) + if (*p == ':') + *s++ = '-'; + else +*** ../vim-7.3.186/src/fileio.c 2011-05-05 16:41:19.000000000 +0200 +--- src/fileio.c 2011-05-10 16:26:06.000000000 +0200 +*************** +*** 504,521 **** + + if (newfile && !read_stdin && !read_buffer) + { +! /* Remember time of file. +! * For RISCOS, also remember the filetype. +! */ + if (mch_stat((char *)fname, &st) >= 0) + { + buf_store_time(curbuf, &st, fname); + curbuf->b_mtime_read = curbuf->b_mtime; +- +- #if defined(RISCOS) && defined(FEAT_OSFILETYPE) +- /* Read the filetype into the buffer local filetype option. */ +- mch_read_filetype(fname); +- #endif + #ifdef UNIX + /* + * Use the protection bits of the original file for the swap file. +--- 504,514 ---- + + if (newfile && !read_stdin && !read_buffer) + { +! /* Remember time of file. */ + if (mch_stat((char *)fname, &st) >= 0) + { + buf_store_time(curbuf, &st, fname); + curbuf->b_mtime_read = curbuf->b_mtime; + #ifdef UNIX + /* + * Use the protection bits of the original file for the swap file. +*************** +*** 557,563 **** + + /* + * for UNIX: check readonly with perm and mch_access() +- * for RISCOS: same as Unix, otherwise file gets re-datestamped! + * for MSDOS and Amiga: check readonly by trying to open the file for writing + */ + file_readonly = FALSE; +--- 550,555 ---- +*************** +*** 3804,3816 **** + + /* make sure we have a valid backup extension to use */ + if (*p_bex == NUL) +- { +- #ifdef RISCOS +- backup_ext = (char_u *)"/bak"; +- #else + backup_ext = (char_u *)".bak"; +- #endif +- } + else + backup_ext = p_bex; + +--- 3796,3802 ---- +*************** +*** 4724,4734 **** + #endif + if (perm >= 0) /* set perm. of new file same as old file */ + (void)mch_setperm(wfname, perm); +- #ifdef RISCOS +- if (!append && !filtering) +- /* Set the filetype after writing the file. */ +- mch_set_filetype(wfname, buf->b_p_oft); +- #endif + #ifdef HAVE_ACL + /* Probably need to set the ACL before changing the user (can't set the + * ACL on a file the user doesn't own). */ +--- 4710,4715 ---- +*************** +*** 6262,6280 **** + */ + for (ptr = retval + fnamelen; ptr > retval; mb_ptr_back(retval, ptr)) + { +- #ifndef RISCOS + if (*ext == '.' +! # ifdef USE_LONG_FNAME + && (!USE_LONG_FNAME || shortname) +! # else +! # ifndef SHORT_FNAME + && shortname +- # endif + # endif + ) + if (*ptr == '.') /* replace '.' by '_' */ + *ptr = '_'; +- #endif + if (vim_ispathsep(*ptr)) + { + ++ptr; +--- 6243,6259 ---- + */ + for (ptr = retval + fnamelen; ptr > retval; mb_ptr_back(retval, ptr)) + { + if (*ext == '.' +! #ifdef USE_LONG_FNAME + && (!USE_LONG_FNAME || shortname) +! #else +! # ifndef SHORT_FNAME + && shortname + # endif ++ #endif + ) + if (*ptr == '.') /* replace '.' by '_' */ + *ptr = '_'; + if (vim_ispathsep(*ptr)) + { + ++ptr; +*************** +*** 6309,6331 **** + if (fname == NULL || *fname == NUL + || vim_ispathsep(fname[STRLEN(fname) - 1])) + { +- #ifdef RISCOS +- if (*ext == '/') +- #else + if (*ext == '.') +- #endif + *s++ = '_'; + } + /* + * If the extension starts with '.', truncate the base name at 8 + * characters + */ +- #ifdef RISCOS +- /* We normally use '/', but swap files are '_' */ +- else if (*ext == '/' || *ext == '_') +- #else + else if (*ext == '.') +- #endif + { + if ((size_t)(s - ptr) > (size_t)8) + { +--- 6288,6301 ---- +*************** +*** 6337,6349 **** + * If the extension doesn't start with '.', and the file name + * doesn't have an extension yet, append a '.' + */ +- #ifdef RISCOS +- else if ((e = vim_strchr(ptr, '/')) == NULL) +- *s++ = '/'; +- #else + else if ((e = vim_strchr(ptr, '.')) == NULL) + *s++ = '.'; +- #endif + /* + * If the extension doesn't start with '.', and there already is an + * extension, it may need to be truncated +--- 6307,6314 ---- +*************** +*** 6371,6393 **** + /* + * Prepend the dot. + */ +! if (prepend_dot && !shortname && *(e = gettail(retval)) != +! #ifdef RISCOS +! '/' +! #else +! '.' +! #endif + #ifdef USE_LONG_FNAME + && USE_LONG_FNAME + #endif + ) + { + STRMOVE(e + 1, e); +- #ifdef RISCOS +- *e = '/'; +- #else + *e = '.'; +- #endif + } + #endif + +--- 6336,6349 ---- + /* + * Prepend the dot. + */ +! if (prepend_dot && !shortname && *(e = gettail(retval)) != '.' + #ifdef USE_LONG_FNAME + && USE_LONG_FNAME + #endif + ) + { + STRMOVE(e + 1, e); + *e = '.'; + } + #endif + +*************** +*** 10205,10223 **** + ++p; + break; + case '.': +- #ifdef RISCOS +- if (allow_dirs != NULL) +- *allow_dirs = TRUE; +- /* FALLTHROUGH */ +- #endif + case '~': + reg_pat[i++] = '\\'; + reg_pat[i++] = *p; + break; + case '?': +- #ifdef RISCOS +- case '#': +- #endif + reg_pat[i++] = '.'; + break; + case '\\': +--- 10161,10171 ---- +*** ../vim-7.3.186/src/globals.h 2011-05-05 14:26:37.000000000 +0200 +--- src/globals.h 2011-05-10 16:26:13.000000000 +0200 +*************** +*** 1513,1519 **** + EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox")); + #endif + EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here")); +! #if defined(AMIGA) || defined(MACOS) || defined(MSWIN) || defined(RISCOS) \ + || defined(UNIX) || defined(VMS) || defined(OS2) + EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported")); + #endif +--- 1513,1519 ---- + EXTERN char_u e_sandbox[] INIT(= N_("E48: Not allowed in sandbox")); + #endif + EXTERN char_u e_secure[] INIT(= N_("E523: Not allowed here")); +! #if defined(AMIGA) || defined(MACOS) || defined(MSWIN) \ + || defined(UNIX) || defined(VMS) || defined(OS2) + EXTERN char_u e_screenmode[] INIT(= N_("E359: Screen mode setting not supported")); + #endif +*** ../vim-7.3.186/src/gui.c 2011-01-17 20:08:03.000000000 +0100 +--- src/gui.c 2011-05-10 16:26:53.000000000 +0200 +*************** +*** 2156,2162 **** + + if (highlight_mask & (HL_INVERSE | HL_STANDOUT)) + { +! #if defined(AMIGA) || defined(RISCOS) + gui_mch_set_colors(bg_color, fg_color); + #else + gui_mch_set_fg_color(bg_color); +--- 2156,2162 ---- + + if (highlight_mask & (HL_INVERSE | HL_STANDOUT)) + { +! #if defined(AMIGA) + gui_mch_set_colors(bg_color, fg_color); + #else + gui_mch_set_fg_color(bg_color); +*************** +*** 2165,2171 **** + } + else + { +! #if defined(AMIGA) || defined(RISCOS) + gui_mch_set_colors(fg_color, bg_color); + #else + gui_mch_set_fg_color(fg_color); +--- 2165,2171 ---- + } + else + { +! #if defined(AMIGA) + gui_mch_set_colors(fg_color, bg_color); + #else + gui_mch_set_fg_color(fg_color); +*************** +*** 2193,2199 **** + if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC))) + return FAIL; + +! #if defined(RISCOS) || defined(FEAT_GUI_GTK) + /* If there's no italic font, then fake it. + * For GTK2, we don't need a different font for italic style. */ + if (hl_mask_todo & HL_ITALIC) +--- 2193,2199 ---- + if (back != 0 && ((draw_flags & DRAW_BOLD) || (highlight_mask & HL_ITALIC))) + return FAIL; + +! #if defined(FEAT_GUI_GTK) + /* If there's no italic font, then fake it. + * For GTK2, we don't need a different font for italic style. */ + if (hl_mask_todo & HL_ITALIC) +*************** +*** 2985,3010 **** + did_clip = TRUE; + } + /* Allow the left button to start the selection */ +- else if (button == +- # ifdef RISCOS +- /* Only start a drag on a drag event. Otherwise +- * we don't get a release event. */ +- MOUSE_DRAG +- # else +- MOUSE_LEFT +- # endif +- ) +- { +- clip_start_selection(X_2_COL(x), Y_2_ROW(y), repeated_click); +- did_clip = TRUE; +- } +- # ifdef RISCOS + else if (button == MOUSE_LEFT) + { +! clip_clear_selection(); + did_clip = TRUE; + } +- # endif + + /* Always allow pasting */ + if (button != MOUSE_MIDDLE) +--- 2985,2995 ---- + did_clip = TRUE; + } + /* Allow the left button to start the selection */ + else if (button == MOUSE_LEFT) + { +! clip_start_selection(X_2_COL(x), Y_2_ROW(y), repeated_click); + did_clip = TRUE; + } + + /* Always allow pasting */ + if (button != MOUSE_MIDDLE) +*** ../vim-7.3.186/src/gui.h 2010-08-15 21:57:25.000000000 +0200 +--- src/gui.h 2011-05-10 16:27:19.000000000 +0200 +*************** +*** 52,61 **** + # include */ + #endif + +- #ifdef RISCOS +- # include "gui_riscos.h" +- #endif +- + #ifdef FEAT_GUI_PHOTON + # include + # include +--- 52,57 ---- +*************** +*** 151,157 **** + #define DRAW_BOLD 0x02 /* draw bold text */ + #define DRAW_UNDERL 0x04 /* draw underline text */ + #define DRAW_UNDERC 0x08 /* draw undercurl text */ +! #if defined(RISCOS) || defined(FEAT_GUI_GTK) + # define DRAW_ITALIC 0x10 /* draw italic text */ + #endif + #define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */ +--- 147,153 ---- + #define DRAW_BOLD 0x02 /* draw bold text */ + #define DRAW_UNDERL 0x04 /* draw underline text */ + #define DRAW_UNDERC 0x08 /* draw undercurl text */ +! #if defined(FEAT_GUI_GTK) + # define DRAW_ITALIC 0x10 /* draw italic text */ + #endif + #define DRAW_CURSOR 0x20 /* drawing block cursor (win32) */ +*************** +*** 219,227 **** + #ifdef FEAT_GUI_MAC + ControlHandle id; /* A handle to the scrollbar */ + #endif +- #ifdef RISCOS +- int id; /* Window handle of scrollbar window */ +- #endif + #ifdef FEAT_GUI_PHOTON + PtWidget_t *id; + #endif +--- 215,220 ---- +*************** +*** 450,463 **** + int visibility; /* Is window partially/fully obscured? */ + #endif + +- #ifdef RISCOS +- int window_handle; +- char_u *window_title; +- int window_title_size; +- int fg_colour; /* in 0xBBGGRR format */ +- int bg_colour; +- #endif +- + #ifdef FEAT_GUI_PHOTON + PtWidget_t *vimWindow; /* PtWindow */ + PtWidget_t *vimTextArea; /* PtRaw */ +--- 443,448 ---- +*** ../vim-7.3.186/src/main.c 2011-04-11 21:35:03.000000000 +0200 +--- src/main.c 2011-05-10 16:27:33.000000000 +0200 +*************** +*** 3276,3286 **** + main_msg(_("+reverse\t\tDon't use reverse video (also: +rv)")); + main_msg(_("-xrm \tSet the specified resource")); + #endif /* FEAT_GUI_X11 */ +- #if defined(FEAT_GUI) && defined(RISCOS) +- mch_msg(_("\nArguments recognised by gvim (RISC OS version):\n")); +- main_msg(_("--columns \tInitial width of window in columns")); +- main_msg(_("--rows \tInitial height of window in rows")); +- #endif + #ifdef FEAT_GUI_GTK + mch_msg(_("\nArguments recognised by gvim (GTK+ version):\n")); + main_msg(_("-font \t\tUse for normal text (also: -fn)")); +--- 3276,3281 ---- +*** ../vim-7.3.186/src/memfile.c 2011-03-22 18:10:34.000000000 +0100 +--- src/memfile.c 2011-05-10 16:27:38.000000000 +0200 +*************** +*** 1307,1313 **** + * fname cannot be NameBuff, because it must have been allocated. + */ + mf_set_ffname(mfp); +! #if defined(MSDOS) || defined(MSWIN) || defined(RISCOS) + /* + * A ":!cd e:xxx" may change the directory without us knowning, use the + * full pathname always. Careful: This frees fname! +--- 1307,1313 ---- + * fname cannot be NameBuff, because it must have been allocated. + */ + mf_set_ffname(mfp); +! #if defined(MSDOS) || defined(MSWIN) + /* + * A ":!cd e:xxx" may change the directory without us knowning, use the + * full pathname always. Careful: This frees fname! +*** ../vim-7.3.186/src/memline.c 2011-02-15 11:56:56.000000000 +0100 +--- src/memline.c 2011-05-10 16:28:40.000000000 +0200 +*************** +*** 748,754 **** + continue; + if (mf_open_file(mfp, fname) == OK) /* consumes fname! */ + { +! #if defined(MSDOS) || defined(MSWIN) || defined(RISCOS) + /* + * set full pathname for swap file now, because a ":!cd dir" may + * change directory without us knowing it. +--- 748,754 ---- + continue; + if (mf_open_file(mfp, fname) == OK) /* consumes fname! */ + { +! #if defined(MSDOS) || defined(MSWIN) + /* + * set full pathname for swap file now, because a ":!cd dir" may + * change directory without us knowing it. +*************** +*** 933,939 **** + b0p->b0_fname[0] = NUL; + else + { +! #if defined(MSDOS) || defined(MSWIN) || defined(AMIGA) || defined(RISCOS) + /* Systems that cannot translate "~user" back into a path: copy the + * file name unmodified. Do use slashes instead of backslashes for + * portability. */ +--- 933,939 ---- + b0p->b0_fname[0] = NUL; + else + { +! #if defined(MSDOS) || defined(MSWIN) || defined(AMIGA) + /* Systems that cannot translate "~user" back into a path: copy the + * file name unmodified. Do use slashes instead of backslashes for + * portability. */ +*************** +*** 1103,1109 **** + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && +! #if defined(VMS) || defined(RISCOS) + STRNICMP(fname + len - 4, "_s" , 2) + #else + STRNICMP(fname + len - 4, ".s" , 2) +--- 1103,1109 ---- + fname = (char_u *)""; + len = (int)STRLEN(fname); + if (len >= 4 && +! #if defined(VMS) + STRNICMP(fname + len - 4, "_s" , 2) + #else + STRNICMP(fname + len - 4, ".s" , 2) +*************** +*** 1773,1783 **** + #ifdef VMS + names[0] = vim_strsave((char_u *)"*_sw%"); + #else +- # ifdef RISCOS +- names[0] = vim_strsave((char_u *)"*_sw#"); +- # else + names[0] = vim_strsave((char_u *)"*.sw?"); +- # endif + #endif + #if defined(UNIX) || defined(WIN3264) + /* For Unix names starting with a dot are special. MS-Windows +--- 1773,1779 ---- +*************** +*** 1804,1814 **** + #ifdef VMS + names[0] = concat_fnames(dir_name, (char_u *)"*_sw%", TRUE); + #else +- # ifdef RISCOS +- names[0] = concat_fnames(dir_name, (char_u *)"*_sw#", TRUE); +- # else + names[0] = concat_fnames(dir_name, (char_u *)"*.sw?", TRUE); +- # endif + #endif + #if defined(UNIX) || defined(WIN3264) + /* For Unix names starting with a dot are special. MS-Windows +--- 1800,1806 ---- +*************** +*** 1877,1883 **** + char_u *swapname; + + swapname = modname(fname_res, +! #if defined(VMS) || defined(RISCOS) + (char_u *)"_swp", FALSE + #else + (char_u *)".swp", TRUE +--- 1869,1875 ---- + char_u *swapname; + + swapname = modname(fname_res, +! #if defined(VMS) + (char_u *)"_swp", FALSE + #else + (char_u *)".swp", TRUE +*************** +*** 2176,2186 **** + #ifdef VMS + names[num_names] = concat_fnames(path, (char_u *)"_sw%", FALSE); + #else +- # ifdef RISCOS +- names[num_names] = concat_fnames(path, (char_u *)"_sw#", FALSE); +- # else + names[num_names] = concat_fnames(path, (char_u *)".sw?", FALSE); +- # endif + #endif + if (names[num_names] == NULL) + goto end; +--- 2168,2174 ---- +*************** +*** 2207,2217 **** + #ifdef VMS + names[num_names] = modname(path, (char_u *)"_sw%", FALSE); + #else +- # ifdef RISCOS +- names[num_names] = modname(path, (char_u *)"_sw#", FALSE); +- # else + names[num_names] = modname(path, (char_u *)".sw?", FALSE); +- # endif + #endif + if (names[num_names] == NULL) + goto end; +--- 2195,2201 ---- +*************** +*** 3205,3211 **** + mf_free(mfp, hp); /* free the data block */ + buf->b_ml.ml_locked = NULL; + +! for (stack_idx = buf->b_ml.ml_stack_top - 1; stack_idx >= 0; --stack_idx) + { + buf->b_ml.ml_stack_top = 0; /* stack is invalid when failing */ + ip = &(buf->b_ml.ml_stack[stack_idx]); +--- 3189,3196 ---- + mf_free(mfp, hp); /* free the data block */ + buf->b_ml.ml_locked = NULL; + +! for (stack_idx = buf->b_ml.ml_stack_top - 1; stack_idx >= 0; +! --stack_idx) + { + buf->b_ml.ml_stack_top = 0; /* stack is invalid when failing */ + ip = &(buf->b_ml.ml_stack[stack_idx]); +*************** +*** 3956,3969 **** + #else + (buf->b_p_sn || buf->b_shortname), + #endif +- #ifdef RISCOS +- /* Avoid problems if fname has special chars, eg */ +- ffname, +- #else + fname_res, +- #endif + (char_u *) +! #if defined(VMS) || defined(RISCOS) + "_swp", + #else + ".swp", +--- 3941,3949 ---- + #else + (buf->b_p_sn || buf->b_shortname), + #endif + fname_res, + (char_u *) +! #if defined(VMS) + "_swp", + #else + ".swp", +*************** +*** 4427,4440 **** + } + close(fd); + } +- #ifdef RISCOS +- else +- /* Can't open swap file, though it does exist. +- * Assume that the user is editing two files with +- * the same name in different directories. No error. +- */ +- differ = TRUE; +- #endif + + /* give the ATTENTION message when there is an old swap file + * for the current file, and the buffer was not recovered. */ +--- 4407,4412 ---- +*** ../vim-7.3.186/src/misc1.c 2011-05-10 14:44:07.000000000 +0200 +--- src/misc1.c 2011-05-10 16:29:29.000000000 +0200 +*************** +*** 4589,4613 **** + vim_ispathsep(c) + int c; + { +! #ifdef RISCOS +! return (c == '.' || c == ':'); +! #else +! # ifdef UNIX + return (c == '/'); /* UNIX has ':' inside file names */ +! # else +! # ifdef BACKSLASH_IN_FILENAME + return (c == ':' || c == '/' || c == '\\'); +! # else +! # ifdef VMS + /* server"user passwd"::device:[full.path.name]fname.extension;version" */ + return (c == ':' || c == '[' || c == ']' || c == '/' + || c == '<' || c == '>' || c == '"' ); +! # else /* Amiga */ + return (c == ':' || c == '/'); +! # endif /* VMS */ +! # endif + # endif +! #endif /* RISC OS */ + } + + #if defined(FEAT_SEARCHPATH) || defined(PROTO) +--- 4589,4609 ---- + vim_ispathsep(c) + int c; + { +! #ifdef UNIX + return (c == '/'); /* UNIX has ':' inside file names */ +! #else +! # ifdef BACKSLASH_IN_FILENAME + return (c == ':' || c == '/' || c == '\\'); +! # else +! # ifdef VMS + /* server"user passwd"::device:[full.path.name]fname.extension;version" */ + return (c == ':' || c == '[' || c == ']' || c == '/' + || c == '<' || c == '>' || c == '"' ); +! # else + return (c == ':' || c == '/'); +! # endif /* VMS */ + # endif +! #endif + } + + #if defined(FEAT_SEARCHPATH) || defined(PROTO) +*** ../vim-7.3.186/src/proto.h 2010-08-15 21:57:29.000000000 +0200 +--- src/proto.h 2011-05-10 16:29:45.000000000 +0200 +*************** +*** 62,70 **** + # ifdef __BEOS__ + # include "os_beos.pro" + # endif +- # ifdef RISCOS +- # include "os_riscos.pro" +- # endif + # ifdef __QNX__ + # include "os_qnx.pro" + # endif +--- 62,67 ---- +*************** +*** 245,253 **** + # ifdef FEAT_GUI_X11 + # include "gui_x11.pro" + # endif +- # ifdef RISCOS +- # include "gui_riscos.pro" +- # endif + # ifdef FEAT_GUI_PHOTON + # include "gui_photon.pro" + # endif +--- 242,247 ---- +*** ../vim-7.3.186/src/quickfix.c 2011-05-05 17:14:07.000000000 +0200 +--- src/quickfix.c 2011-05-10 16:30:18.000000000 +0200 +*************** +*** 1182,1202 **** + if (fname == NULL || *fname == NUL) /* no file name */ + return 0; + { +- #ifdef RISCOS +- /* Name is reported as `main.c', but file is `c.main' */ +- return ro_buflist_add(fname); +- #else + char_u *ptr; + int fnum; + +! # ifdef VMS + vms_remove_version(fname); +! # endif +! # ifdef BACKSLASH_IN_FILENAME + if (directory != NULL) + slash_adjust(directory); + slash_adjust(fname); +! # endif + if (directory != NULL && !vim_isAbsName(fname) + && (ptr = concat_fnames(directory, fname, TRUE)) != NULL) + { +--- 1182,1198 ---- + if (fname == NULL || *fname == NUL) /* no file name */ + return 0; + { + char_u *ptr; + int fnum; + +! #ifdef VMS + vms_remove_version(fname); +! #endif +! #ifdef BACKSLASH_IN_FILENAME + if (directory != NULL) + slash_adjust(directory); + slash_adjust(fname); +! #endif + if (directory != NULL && !vim_isAbsName(fname) + && (ptr = concat_fnames(directory, fname, TRUE)) != NULL) + { +*************** +*** 1221,1227 **** + return fnum; + } + return buflist_add(fname, 0); +- #endif + } + } + +--- 1217,1222 ---- +*** ../vim-7.3.186/src/search.c 2011-02-25 18:38:29.000000000 +0100 +--- src/search.c 2011-05-10 16:30:38.000000000 +0200 +*************** +*** 4581,4589 **** + char_u *already = NULL; + char_u *startp = NULL; + char_u *inc_opt = NULL; +- #ifdef RISCOS +- int previous_munging = __riscosify_control; +- #endif + #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) + win_T *curwin_save = NULL; + #endif +--- 4581,4586 ---- +*************** +*** 4596,4606 **** + if (file_line == NULL) + return; + +- #ifdef RISCOS +- /* UnixLib knows best how to munge c file names - turn munging back on. */ +- int __riscosify_control = 0; +- #endif +- + if (type != CHECK_PATH && type != FIND_DEFINE + #ifdef FEAT_INS_EXPAND + /* when CONT_SOL is set compare "ptr" with the beginning of the line +--- 4593,4598 ---- +*************** +*** 5228,5238 **** + vim_free(regmatch.regprog); + vim_free(incl_regmatch.regprog); + vim_free(def_regmatch.regprog); +- +- #ifdef RISCOS +- /* Restore previous file munging state. */ +- __riscosify_control = previous_munging; +- #endif + } + + static void +--- 5220,5225 ---- +*** ../vim-7.3.186/src/structs.h 2011-03-22 18:10:34.000000000 +0100 +--- src/structs.h 2011-05-10 16:30:49.000000000 +0200 +*************** +*** 2366,2376 **** + MenuHandle menu_handle; + MenuHandle submenu_handle; + #endif +- #ifdef RISCOS +- int *id; /* Not used, but gui.c needs it */ +- int greyed_out; /* Flag */ +- int hidden; +- #endif + #ifdef FEAT_GUI_PHOTON + PtWidget_t *id; + PtWidget_t *submenu_id; +--- 2366,2371 ---- +*** ../vim-7.3.186/src/term.c 2010-12-30 14:47:32.000000000 +0100 +--- src/term.c 2011-05-10 16:31:41.000000000 +0200 +*************** +*** 52,58 **** + + /* + * Here are the builtin termcap entries. They are not stored as complete +! * Tcarr structures, as such a structure is too big. + * + * The entries are compact, therefore they normally are included even when + * HAVE_TGETENT is defined. When HAVE_TGETENT is defined, the builtin entries +--- 52,58 ---- + + /* + * Here are the builtin termcap entries. They are not stored as complete +! * structures with all entries, as such a structure is too big. + * + * The entries are compact, therefore they normally are included even when + * HAVE_TGETENT is defined. When HAVE_TGETENT is defined, the builtin entries +*************** +*** 199,269 **** + #endif + + #ifndef NO_BUILTIN_TCAPS +- # if defined(RISCOS) || defined(ALL_BUILTIN_TCAPS) +- /* +- * Default for the Acorn. +- */ +- {(int)KS_NAME, "riscos"}, +- {(int)KS_CL, "\014"}, /* Cls and Home Cursor */ +- {(int)KS_CM, "\001%d\001%d\002"}, /* Position cursor */ +- +- {(int)KS_CCO, "16"}, /* Allow 16 colors */ +- +- {(int)KS_CAF, "\001%d\021"}, /* Set foreground colour */ +- {(int)KS_CAB, "\001%d\022"}, /* Set background colour */ +- +- +- {(int)KS_ME, "\004"}, /* Normal mode */ +- {(int)KS_MR, "\005"}, /* Reverse */ +- +- {(int)KS_VI, "\016"}, /* Cursor invisible */ +- {(int)KS_VE, "\017"}, /* Cursor visible */ +- {(int)KS_VS, "\020"}, /* Cursor very visible */ +- +- {(int)KS_CS, "\001%d\001%d\003"}, /* Set scroll region */ +- {(int)KS_SR, "\023"}, /* Scroll text down */ +- {K_UP, "\217"}, +- {K_DOWN, "\216"}, +- {K_LEFT, "\214"}, +- {K_RIGHT, "\215"}, +- {K_S_UP, "\237"}, +- {K_S_DOWN, "\236"}, +- {K_S_LEFT, "\234"}, +- {K_S_RIGHT, "\235"}, +- +- {K_F1, "\201"}, +- {K_F2, "\202"}, +- {K_F3, "\203"}, +- {K_F4, "\204"}, +- {K_F5, "\205"}, +- {K_F6, "\206"}, +- {K_F7, "\207"}, +- {K_F8, "\210"}, +- {K_F9, "\211"}, +- {K_F10, "\312"}, +- {K_F11, "\313"}, +- {K_F12, "\314"}, +- {K_S_F1, "\221"}, +- {K_S_F2, "\222"}, +- {K_S_F3, "\223"}, +- {K_S_F4, "\224"}, +- {K_S_F5, "\225"}, +- {K_S_F6, "\226"}, +- {K_S_F7, "\227"}, +- {K_S_F8, "\230"}, +- {K_S_F9, "\231"}, +- {K_S_F10, "\332"}, +- {K_S_F11, "\333"}, +- {K_S_F12, "\334"}, +- {K_BS, "\010"}, +- {K_INS, "\315"}, +- {K_DEL, "\177"}, +- {K_HOME, "\036"}, +- {K_END, "\213"}, +- {K_PAGEUP, "\237"}, +- {K_PAGEDOWN, "\236"}, +- # endif /* Acorn terminal */ +- + + # if defined(AMIGA) || defined(ALL_BUILTIN_TCAPS) + /* +--- 199,204 ---- +*************** +*** 1399,1408 **** + /* + * DEFAULT_TERM is used, when no terminal is specified with -T option or $TERM. + */ +- #ifdef RISCOS +- # define DEFAULT_TERM (char_u *)"riscos" +- #endif +- + #ifdef AMIGA + # define DEFAULT_TERM (char_u *)"amiga" + #endif +--- 1334,1339 ---- +*** ../vim-7.3.186/src/termlib.c 2010-08-15 21:57:30.000000000 +0200 +--- src/termlib.c 2011-05-10 16:31:58.000000000 +0200 +*************** +*** 13,19 **** + #include "vim.h" + #include "termlib.pro" + +! #if !defined(AMIGA) && !defined(VMS) && !defined(MACOS) && !defined(RISCOS) + # include + #endif + +--- 13,19 ---- + #include "vim.h" + #include "termlib.pro" + +! #if !defined(AMIGA) && !defined(VMS) && !defined(MACOS) + # include + #endif + +*** ../vim-7.3.186/src/version.c 2011-05-10 16:12:40.000000000 +0200 +--- src/version.c 2011-05-10 16:37:20.000000000 +0200 +*************** +*** 1205,1213 **** + # endif + #endif + +- #ifdef RISCOS +- MSG_PUTS(_("\nRISC OS version")); +- #endif + #ifdef VMS + MSG_PUTS(_("\nOpenVMS version")); + # ifdef HAVE_PATHDEF +--- 1207,1212 ---- +*** ../vim-7.3.186/src/vim.h 2011-05-05 16:41:19.000000000 +0200 +--- src/vim.h 2011-05-10 16:32:40.000000000 +0200 +*************** +*** 184,192 **** + # define SIZEOF_INT 2 + # endif + #endif +- #ifdef RISCOS +- # define SIZEOF_INT 4 +- #endif + + + #include "feature.h" /* #defines for optionals and features */ +--- 184,189 ---- +*************** +*** 340,349 **** + # include "os_mac.h" + #endif + +- #ifdef RISCOS +- # include "os_riscos.h" +- #endif +- + #ifdef __QNX__ + # include "os_qnx.h" + #endif +--- 337,342 ---- +*** ../vim-7.3.186/src/gui_riscos.h 2010-08-15 21:57:28.000000000 +0200 +--- src/gui_riscos.h 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,32 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- */ +- +- #define FEAT_BROWSE +- +- #define TASK 0x4b534154 +- +- /* Nested wimp flags: */ +- #define CHILD_FIX_TO_WORKAREA 0 +- #define CHILD_FIX_TO_LEFT 1 +- #define CHILD_FIX_TO_BOTTOM 1 +- #define CHILD_FIX_TO_RIGHT 2 +- #define CHILD_FIX_TO_TOP 2 +- +- #define CHILD_SELF_SCROLL 0 +- #define CHILD_PARENT_SCROLL 1 +- +- #define CHILD_LEFT 16 +- #define CHILD_BOTTOM 18 +- #define CHILD_RIGHT 20 +- #define CHILD_TOP 22 +- #define CHILD_SCROLL_X 24 +- #define CHILD_SCROLL_Y 26 +- +- int wimp_poll(int mask, int *block); +- int wimp_poll_idle(int mask, int *block, int end_time); +- void ro_open_main(int *block); +--- 0 ---- +*** ../vim-7.3.186/src/os_riscos.h 2010-08-15 21:57:30.000000000 +0200 +--- src/os_riscos.h 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,166 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- */ +- +- #include +- #include +- #include +- #include +- #include +- #include +- #include +- #include +- +- #define CASE_INSENSITIVE_FILENAME +- #define FEAT_MODIFY_FNAME +- #define FEAT_OSFILETYPE +- #define DFLT_OFT "Text" +- #define USE_TERM_CONSOLE +- #define HAVE_AVAIL_MEM +- +- /* Longer filenames now accessible to all */ +- #ifndef BASENAMELEN +- # define BASENAMELEN 64 /* Same length as unzip */ +- #endif +- +- #ifndef TEMNAME +- # define TEMPNAME ".v?XXXXXX" +- # define TEMPNAMELEN 25 +- #endif +- +- #ifndef DFLT_HELPFILE +- # define DFLT_HELPFILE "Vim:doc.help" +- #endif +- +- #ifndef DFLT_BDIR +- # define DFLT_BDIR ".,." /* default for 'backupdir' */ +- #endif +- +- /* Paths to try putting swap file in. */ +- #ifndef DFLT_DIR +- # define DFLT_DIR ".,." /* default for 'directory' */ +- #endif +- +- #ifndef DFLT_VDIR +- # define DFLT_VDIR "Choices:Vim.view" /* default for 'viewdir' */ +- #endif +- +- #ifndef TERMCAPFILE +- # define TERMCAPFILE "Vim:TermCap" +- #endif +- #define HAVE_TGETENT +- +- #ifndef SYNTAX_FNAME +- # define SYNTAX_FNAME "Vim:Syntax.%s" +- #endif +- +- #ifndef EVIM_FILE +- # define EVIM_FILE "Vim:Evim" +- #endif +- +- #define FEAT_VIMINFO +- +- #ifndef VIMINFO_FILE +- # define VIMINFO_FILE ".Vim.VimInfo" +- #endif +- #ifndef VIMINFO_FILE2 +- # define VIMINFO_FILE2 "Choices:Vim.VimInfo" +- #endif +- +- #ifndef VIMRC_FILE +- # define VIMRC_FILE "/vimrc" +- #endif +- #ifndef EXRC_FILE +- # define EXRC_FILE "/exrc" +- #endif +- #ifndef GVIMRC_FILE +- # define GVIMRC_FILE "/gvimrc" +- #endif +- #ifndef USR_VIMRC_FILE +- # define USR_VIMRC_FILE "Vim:Evim" +- #endif +- #ifndef SESSION_FILE +- # define SESSION_FILE "/Session.vim" +- #endif +- #ifndef USR_VIMRC_FILE +- # define USR_VIMRC_FILE "Choices:Vim.VimRC" +- #endif +- #ifndef USR_GVIMRC_FILE +- # define USR_GVIMRC_FILE "Choices:Vim.GVimRC" +- #endif +- #ifndef USR_EXRC_FILE +- # define USR_EXRC_FILE "Choices:Vim.ExRC" +- #endif +- #ifndef SYS_VIMRC_FILE +- # define SYS_VIMRC_FILE "Vim:VimRC" +- #endif +- #ifndef SYS_GVIMRC_FILE +- # define SYS_GVIMRC_FILE "Vim:GVimRC" +- #endif +- #ifndef SYS_MENU_FILE +- # define SYS_MENU_FILE "Vim:Menu" +- #endif +- #ifndef SYS_OPTWIN_FILE +- # define SYS_OPTWIN_FILE "Vim:Optwin" +- #endif +- #ifndef FILETYPE_FILE +- # define FILETYPE_FILE "Vim:Filetype" +- #endif +- #ifndef FTPLUGIN_FILE +- # define FTPLUGIN_FILE "Vim:Ftplugin/vim" +- #endif +- #ifndef INDENT_FILE +- # define INDENT_FILE "Vim:Indent/vim" +- #endif +- #ifndef FTOFF_FILE +- # define FTOFF_FILE "Vim:Ftoff" +- #endif +- #ifndef FTPLUGOF_FILE +- # define FTPLUGOF_FILE "Vim:Ftplugof" +- #endif +- #ifndef INDOFF_FILE +- # define INDOFF_FILE "Vim:Indoff" +- #endif +- +- #define DFLT_ERRORFILE "errors/vim" +- #define DFLT_RUNTIMEPATH "Choices:Vim,Vim:,Choices:Vim.after" +- +- /* +- * RISC PCs have plenty of memory, use large buffers +- */ +- #define CMDBUFFSIZE 1024 /* size of the command processing buffer */ +- #define MAXPATHL 256 /* paths are always quite short though */ +- +- #ifndef DFLT_MAXMEM +- # define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */ +- #endif +- +- #ifndef DFLT_MAXMEMTOT +- # define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */ +- #endif +- +- #ifdef HAVE_SIGSET +- # define signal sigset +- #endif +- +- #define n_flag (1<<31) +- #define z_flag (1<<30) +- #define c_flag (1<<29) +- #define v_flag (1<<28) +- +- /* These take r0-r7 as inputs, returns r0-r7 in global variables. */ +- void swi(int swinum, ...); /* Handles errors itself */ +- int xswi(int swinum, ...); /* Returns errors using v flag */ +- extern int r0, r1, r2, r3, r4, r5, r6, r7; /* For return values */ +- +- #include +- #include +- +- #define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len) +- #define mch_rename(src, dst) rename(src, dst) +- #define mch_getenv(x) (char_u *)getenv((char *)x) +- #define mch_setenv(name, val, x) setenv(name, val, x) +--- 0 ---- +*** ../vim-7.3.186/src/gui_riscos.c 2011-05-10 15:52:10.000000000 +0200 +--- src/gui_riscos.c 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,3558 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- * See README.txt for an overview of the Vim source code. +- */ +- +- #include "vim.h" +- #include +- +- /* +- * gui_riscos.c +- * +- * Thomas Leonard +- * Updated by Andy Wingate +- */ +- +- extern int time_of_last_poll; +- +- int task_handle = 0; /* Zero means we are not yet a Wimp task */ +- int child_handle = 0; /* Task handle of our child process (zero if none). */ +- int *wimp_menu = (int *) -1; /* Pointer to a Wimp menu structure (or -1) */ +- int save_window = -1; /* Save As window handle */ +- +- int *redraw_block = NULL; /* NULL means not in a redraw loop. */ +- int ro_return_early = FALSE; /* Break out of gui_mch_wait_for_chars() */ +- +- int leaf_ref = 0; /* Wimp message number - send via Wimp$Scrap */ +- char_u *leaf_name = NULL; /* Leaf name from DataSave */ +- +- int default_columns = 120; /* These values are used if the --rows and --columns */ +- int default_rows = 32; /* options aren't used on startup. */ +- +- #define DRAG_FALSE 0 +- #define DRAG_SELECTION 1 +- #define DRAG_RESIZE_WINDOW 2 +- int ro_dragging = DRAG_FALSE; +- int drag_button; +- int drag_modifiers; +- int drag_x_offset; +- int drag_y_offset; +- +- int nested_wimp = FALSE; /* Bool - can we use the new wimp? */ +- +- int changed_mode = FALSE; +- int x_eigen_factor; +- int y_eigen_factor; +- +- /* If ro_current_font is non-zero then use the outline font with that handle, +- * otherwise, if zap_redraw is TRUE then use ZapRedraw, otherwise use the +- * system font. +- * +- * If zap_redraw is TRUE then zap_file[] contains valid Zap font file +- * pointers (or NULLs). +- */ +- int ro_current_font = 0; /* 0 is system font, or ZapRedraw */ +- int font_x_offset = 0; /* Where to position each char in its box */ +- int font_y_offset = 0; +- +- int zap_redraw = FALSE; +- int double_height = FALSE; /* Plot each line twice? */ +- +- #define grgb(r,g,b) ((b<<16) + (g<<8) + (r)) +- #define UNUSED_COLOUR (gui.back_pixel) +- +- #define RO_LOAD_CLIPBOARD -2 /* Internal handle for DataSave message. */ +- +- /* Changes by John Kortink, 22-23 July 1998 +- * +- * Stuff to make redraw a lot faster. Almost all of it is right here below, +- * elsewhere changes are marked with 'JK230798'. Apart from a small change in +- * 'gui.c' all changes are limited to this file, 'gui_riscos.c'. The change in +- * 'gui.c' is to make Vim stop being 'smart' not redrawing characters that are +- * 'already there' (i.e. from the previous line, by coincidence). This caused a +- * lot more calls to the redraw code, which we want to avoid because a few nice +- * big strings at a time is a lot faster than a truckload of small ones. ('Dear +- * Bram ...'). +- */ +- +- /* The ZapRedraw structure */ +- +- static struct +- { +- int r_flags; +- int r_minx; +- int r_miny; +- int r_maxx; +- int r_maxy; +- int r_screen; +- int r_bpl; +- int r_bpp; +- int r_charw; +- int r_charh; +- char *r_caddr; +- int r_cbpl; +- int r_cbpc; +- int r_linesp; +- int r_data; +- int r_scrollx; +- int r_scrolly; +- int *r_palette; +- int r_for; +- int r_bac; +- char *r_workarea; +- int r_magx; +- int r_magy; +- int r_xsize; +- int r_ysize; +- int r_mode; +- } +- zap_redraw_block; +- +- /* Other globals */ +- +- static int zap_redraw_initialised = FALSE; +- static int zap_redraw_update_colours; +- static int zap_redraw_colours[2]; +- static int zap_redraw_palette[16]; +- +- /* Holds the current Zap font file(s). +- * The font is recreated from this block on a mode change. +- * When using zap, element ZAP_NORMAL is always valid, but +- * the others can be NULL. +- */ +- +- #define ZAP_NORMAL 0 +- #define ZAP_BOLD 1 +- #define ZAP_ITALIC 2 +- #define ZAP_BITALIC 3 +- #define ZAP_STYLES 4 +- +- /* Zap font file format data */ +- static char *zap_file[ZAP_STYLES] = {NULL, NULL, NULL, NULL}; +- +- /* r_caddr format for current mode */ +- static char *zap_caddr[ZAP_STYLES] = {NULL, NULL, NULL, NULL}; +- +- static void ro_remove_menu(int *menu); +- +- /* +- * Initialise all the ZapRedraw stuff. +- * Call this when changing font and after each mode change. +- * zap_redraw_bitmap must contain a valid Zap font file (possibly +- * created from the system font). +- * +- * Return FAIL to revert to system font (if we can't use ZapRedraw). +- */ +- int +- ro_zap_redraw_initialise() +- { +- int bytes_per_bitmap_char; +- int first, last; +- int i; +- +- /* Can't have initialisers for struct members :-(, ok, this way then ... */ +- if (!zap_redraw_initialised) +- { +- zap_redraw_block.r_workarea = NULL; +- zap_redraw_initialised = TRUE; +- } +- +- /* We redraw in DSA mode */ +- zap_redraw_block.r_flags = 0x0; +- +- /* Let ZapRedraw get the screen address for us */ +- zap_redraw_block.r_screen = 0; +- +- /* Read the font width and height from the font file header. +- * Assume that all styles are the same size. +- * ZAP_NORMAL is always present. +- */ +- zap_redraw_block.r_charw = ((int *) zap_file[ZAP_NORMAL])[2]; +- zap_redraw_block.r_charh = ((int *) zap_file[ZAP_NORMAL])[3]; +- +- /* We have no linespacing */ +- zap_redraw_block.r_linesp = 0; +- +- /* Fix foreground = colour 1 */ +- zap_redraw_block.r_for = 1; +- +- /* Fix background = colour 0 */ +- zap_redraw_block.r_bac = 0; +- +- /* Colour mask buffer */ +- zap_redraw_block.r_palette = zap_redraw_palette; +- +- /* Allocate local workspace (for the few calls following here) */ +- if (zap_redraw_block.r_workarea != NULL) +- free(zap_redraw_block.r_workarea); +- zap_redraw_block.r_workarea = (char*) malloc(128); +- if (!zap_redraw_block.r_workarea) +- return FAIL; /* Out of memory */ +- +- /* Fill in VDU variables */ +- if (xswi(ZapRedraw_ReadVduVars, 0, &zap_redraw_block) & v_flag) +- return FAIL; /* Can't find ZapRedraw module - use VDU instead */ +- +- /* Determine cbpl and cbpc */ +- swi(ZapRedraw_CachedCharSize, zap_redraw_block.r_bpp, 0, +- zap_redraw_block.r_charw, zap_redraw_block.r_charh); +- zap_redraw_block.r_cbpl = r2; +- zap_redraw_block.r_cbpc = r3; +- +- /* Allocate general workspace (for the calls outside) */ +- if (zap_redraw_block.r_workarea != NULL) +- free(zap_redraw_block.r_workarea); +- zap_redraw_block.r_workarea = (char*) malloc(128 + zap_redraw_block.r_cbpl); +- if (!zap_redraw_block.r_workarea) +- return FAIL; /* Out of memory */ +- +- /* Now convert the 1 bpp character data ready for the current mode */ +- +- bytes_per_bitmap_char = (zap_redraw_block.r_charw * zap_redraw_block.r_charh + 7) / 8; +- +- /* Convert the fonts from 1bpp to a format suitable for the +- * current mode. +- */ +- for (i = 0; i < ZAP_STYLES; i++) +- { +- first = ((int *) zap_file[i])[4]; +- last = ((int *) zap_file[i])[5]; +- +- if (last > 255) +- last = 255; /* Don't convert cursors (overwrites memory!) */ +- +- /* Allocate the font cache */ +- vim_free(zap_caddr[i]); +- if (zap_file[i]) +- zap_caddr[i] = (char*) malloc(zap_redraw_block.r_cbpc * 256); +- else +- zap_caddr[i] = NULL; /* No file for this style */ +- +- if (zap_caddr[i]) +- { +- zap_redraw_block.r_caddr = zap_caddr[i]; +- +- swi(ZapRedraw_ConvertBitmap, 0, &zap_redraw_block, +- first, last, /* Range of characters to convert */ +- zap_file[i] + 0x20 /* Addr of first char provided by font */ +- - first * bytes_per_bitmap_char); +- } +- } +- +- if (!zap_caddr[ZAP_NORMAL]) +- { +- zap_redraw = FALSE; /* Out of memory */ +- return FAIL; +- } +- +- /* Next time we need them, we have to update the colour masks */ +- zap_redraw_update_colours = TRUE; +- +- return OK; +- } +- +- /* +- * Redraw a string at OS coordinates (top-left, x inclusive, y exclusive). +- * Graphics clip window is window[0..3] as in R1+28..40 of Wimp_RedrawWindow. +- * Returns (possibly modified) flags. +- */ +- int +- ro_zap_redraw_draw_string(x, y, string, length, flags, clip) +- int x; +- int y; +- char *string; +- int length; +- int flags; /* DRAW_TRANSP, DRAW_BOLD, DRAW_UNDERL, DRAW_ITALIC */ +- int *clip; +- { +- char redraw_data[1024]; +- int clip_minx; +- int clip_miny; +- int clip_maxx; +- int clip_maxy; +- int os_xshift = zap_redraw_block.r_magx; +- int os_yshift = zap_redraw_block.r_magy; +- +- if (flags & DRAW_TRANSP) +- return flags; /* We don't do transparent plotting yet. */ +- +- if (flags & DRAW_BOLD) +- { +- if (flags & DRAW_ITALIC && zap_caddr[ZAP_BITALIC]) +- zap_redraw_block.r_caddr = zap_caddr[ZAP_BITALIC]; +- else +- zap_redraw_block.r_caddr = zap_caddr[ZAP_BOLD]; +- } +- else +- { +- if (flags & DRAW_ITALIC) +- zap_redraw_block.r_caddr = zap_caddr[ZAP_ITALIC]; +- else +- zap_redraw_block.r_caddr = zap_caddr[ZAP_NORMAL]; +- } +- if (!zap_redraw_block.r_caddr) +- { +- zap_redraw_block.r_caddr = zap_caddr[ZAP_NORMAL]; +- flags |= DRAW_UNDERL; /* Style missing - we can always underline */ +- } +- +- /* Set the vertical scaling flag */ +- if (double_height) +- zap_redraw_block.r_flags = 1 << 1; +- else +- zap_redraw_block.r_flags = 0; +- +- /* Update the colour masks (if needed) */ +- if (zap_redraw_update_colours) +- { +- swi(ZapRedraw_CreatePalette, 2, +- &zap_redraw_block, +- zap_redraw_colours, +- zap_redraw_block.r_palette, 2); +- zap_redraw_update_colours = FALSE; +- } +- +- /* Target rectangle in ZapRedraw rectangle coordinates (pixels, Y-min/max reversed !!!) */ +- zap_redraw_block.r_minx = x >> os_xshift; /* inclusive */ +- zap_redraw_block.r_miny = zap_redraw_block.r_ysize - (y >> os_yshift); /* inclusive */ +- zap_redraw_block.r_maxx = (x + length * gui.char_width) >> os_xshift; /* exclusive */ +- zap_redraw_block.r_maxy = zap_redraw_block.r_ysize - ((y - gui.char_height) >> os_yshift); +- /* exclusive */ +- +- /* Clip rectangle in ZapRedraw rectangle coordinates (pixels, Y-min/max reversed !!!) */ +- clip_minx = clip[0] >> os_xshift; /* inclusive */ +- clip_miny = zap_redraw_block.r_ysize - (clip[3] >> os_yshift); /* inclusive */ +- clip_maxx = clip[2] >> os_xshift; /* exclusive */ +- clip_maxy = zap_redraw_block.r_ysize - (clip[1] >> os_yshift); /* exclusive */ +- +- /* Clip target rectangle against the current graphics window */ +- if (zap_redraw_block.r_minx < clip_minx) +- { +- zap_redraw_block.r_scrollx = clip_minx - zap_redraw_block.r_minx; +- zap_redraw_block.r_minx = clip_minx; +- } +- else +- zap_redraw_block.r_scrollx = 0; +- if (zap_redraw_block.r_miny < clip_miny) +- { +- zap_redraw_block.r_scrolly = clip_miny - zap_redraw_block.r_miny; +- zap_redraw_block.r_miny = clip_miny; +- } +- else +- zap_redraw_block.r_scrolly = 0; +- if (zap_redraw_block.r_maxx > clip_maxx) +- zap_redraw_block.r_maxx = clip_maxx; +- if (zap_redraw_block.r_maxy > clip_maxy) +- zap_redraw_block.r_maxy = clip_maxy; +- +- /* Fill in the character data structure */ +- if (length > (sizeof(redraw_data) - 2 * 4 - 2)) +- length = sizeof(redraw_data) - 2 * 4 - 2; +- ((int*) redraw_data)[0] = 2 * 4; +- ((int*) redraw_data)[1] = 0; +- strncpy(redraw_data + 2 * 4, string, length); +- redraw_data[2 * 4 + length + 0] = '\0'; +- redraw_data[2 * 4 + length + 1] = '\x2'; +- zap_redraw_block.r_data = (int) redraw_data; +- +- /* Perform the draw */ +- swi(ZapRedraw_RedrawArea, 0, &zap_redraw_block); +- +- return flags; +- } +- +- /* +- * Okay that was it from me, back to Thomas ... +- */ +- +- /* +- * Parse the GUI related command-line arguments. Any arguments used are +- * deleted from argv, and *argc is decremented accordingly. This is called +- * when vim is started, whether or not the GUI has been started. +- */ +- void +- gui_mch_prepare(int *argc, char **argv) +- { +- int arg = 1; +- +- while (arg < *argc - 1) +- { +- if (strcmp(argv[arg], "--rows") == 0 || strcmp(argv[arg], "--columns") == 0) +- { +- int value; +- +- value = atoi(argv[arg + 1]); +- +- if (argv[arg][2] == 'r') +- default_rows = value; +- else +- default_columns = value; +- +- /* Delete argument from argv[]. (hope this is read/write!) */ +- +- *argc -= 2; +- if (*argc > arg) +- mch_memmove(&argv[arg], &argv[arg + 2], (*argc - arg) +- * sizeof(char *)); +- } +- else +- arg++; +- } +- } +- +- /* Fatal error on initialisation - report it and die. */ +- void +- ro_die(error) +- char_u *error; /* RISC OS error block */ +- { +- swi(Wimp_ReportError, error, 5, "GVim"); +- exit(EXIT_FAILURE); +- } +- +- /* Find the sizes of the window tools: +- * +- * Create a test window. +- * Find inner and outer sizes. +- * Find the difference. +- * Delete window. +- * +- * While we're here, find the eigen values too. +- */ +- void +- ro_measure_tools() +- { +- int block[10]; +- int vdu[] = { 4, 5, -1}; +- int test_window[] = +- { +- -100, -100, /* Visible area : min X,Y */ +- -50, -50, /* max X,Y */ +- 0, 0, /* Scroll offsets */ +- -1, /* Window in front */ +- 0xd0800150, /* Window flags */ +- 0xff070207, /* Colours */ +- 0x000c0103, /* More colours */ +- 0, -0x4000, /* Workarea extent */ +- 0x4000, 0, /* max X,Y */ +- 0x00000000, /* No title */ +- 0 << 12, /* No workarea button type */ +- 1, /* Wimp sprite area */ +- 0x00010001, /* Minimum width, height */ +- 0, 0, 0, /* Title data (none) */ +- 0 /* No icons */ +- }; +- int inner_max_x, inner_min_y; +- +- swi(Wimp_CreateWindow, 0, test_window); +- +- block[0] = r0; +- /* Open the window (and read state). +- * GetWindowOutline needs it too if the wimp isn't nested. +- */ +- swi(Wimp_OpenWindow, 0, block); +- inner_max_x = block[3]; +- inner_min_y = block[2]; +- +- swi(Wimp_GetWindowOutline, 0, block); +- +- gui.scrollbar_width = block[3] - inner_max_x; +- gui.scrollbar_height = inner_min_y - block[2]; +- +- swi(Wimp_DeleteWindow, 0, block); +- +- /* Read the size of one pixel. */ +- swi(OS_ReadVduVariables, vdu, vdu); +- x_eigen_factor = vdu[0]; +- y_eigen_factor = vdu[1]; +- } +- +- /* Load a template from the current templates file. +- * Create the window and return its handle. +- */ +- int +- ro_load_template(str_name, title, title_size) +- char_u *str_name; /* Identifier of window in file (max 12 chars) */ +- char_u **title; /* If not NULL then return pointer to title here */ +- int *title_size; /* If not NULL then return the title length here */ +- { +- int *window; +- char *data; +- int name[4]; +- +- strcpy( (char *) name, str_name); +- +- /* Find how big we must make the buffers */ +- +- if (xswi(Wimp_LoadTemplate, 0, 0, 0, 0, -1, name, 0) & v_flag) +- ro_die( (char *) r0); +- +- window = malloc(r1); /* Don't print text messages from alloc() */ +- data = malloc(r2); +- if (window == NULL || data == NULL) +- ro_die("\0\0\0\0Out of memory - Can't load templates"); +- +- /* Load the template into the buffers */ +- +- swi(Wimp_LoadTemplate, 0, +- window, /* Temp block */ +- data, /* Icon data */ +- data + r2 + 1, /* End of icon data */ +- -1, /* No fonts */ +- name, 0); /* First match */ +- if (r6 == 0) +- ro_die("\0\0\0\0Can't find window in Templates file"); +- +- /* Create the window */ +- +- if (xswi(Wimp_CreateWindow, 0, window) & v_flag) +- ro_die( (char *) r0); +- +- if (title) +- *title = (char_u *) window[18]; +- if (title_size) +- *title_size = window[20]; +- +- free(window); /* Free temp block */ +- return r0; /* Return the window handle */ +- } +- +- /* +- * Check if the GUI can be started. Called before gvimrc is sourced. +- * Return OK or FAIL. +- */ +- int +- gui_mch_init_check() +- { +- return OK; /* TODO: GUI can always be started? */ +- } +- +- /* +- * Initialise the RISC OS GUI. +- * Create all the windows. +- * Returns OK for success, FAIL when the GUI can't be started. +- */ +- int +- gui_mch_init() +- { +- int messages[] = { +- 1, 2, 3, 4, /* DataSave, DataSaveAck, DataLoad, DataLoadAck */ +- 8, /* PreQuit */ +- 0xf, /* ClaimEntity (for clipboard) */ +- 0x10, /* DataRequest (for clipboard) */ +- 0x400c1, /* Mode change */ +- 0x400c3, /* TaskCloseDown */ +- 0x400c9, /* MenusDeleted */ +- 0x808c1, /* TW_Output */ +- 0x808c2, /* TW_Ego */ +- 0x808c3, /* TW_Morio */ +- 0x808c4, /* TW_Morite */ +- 0}; /* End-of-list. */ +- +- +- /* There may have been some errors reported in the +- * command window before we get here. Wait if so. +- */ +- swi(Wimp_ReadSysInfo, 3); +- if (r0 == 0) +- swi(Wimp_CommandWindow, 0); /* Window opened - close with prompt */ +- +- if (xswi(Wimp_Initialise, 310, 0x4b534154, "GVim", messages) & v_flag) +- return FAIL; +- nested_wimp = r0 >= 397; +- task_handle = r1; +- +- /* Load the templates. */ +- +- if (xswi(Wimp_OpenTemplate, 0, "Vim:Templates") & v_flag) +- ro_die( (char *) r0); +- +- gui.window_handle = ro_load_template("editor", +- &gui.window_title, +- &gui.window_title_size); +- +- save_window = ro_load_template("save", NULL, NULL); +- +- swi(Wimp_CloseTemplate); +- +- /* Set default foreground and background colours. */ +- +- gui.norm_pixel = gui.def_norm_pixel; +- gui.back_pixel = gui.def_back_pixel; +- +- /* Get the colours from the "Normal" and "Menu" group (set in syntax.c or +- * in a vimrc file) */ +- +- set_normal_colors(); +- +- /* +- * Check that none of the colors are the same as the background color +- */ +- +- gui_check_colors(); +- +- /* Get the colours for the highlight groups (gui_check_colors() might have +- * changed them) */ +- +- highlight_gui_started(); /* re-init colours and fonts */ +- +- /* Set geometry based on values read on initialisation. */ +- +- gui.num_cols = Columns = default_columns; +- gui.num_rows = Rows = default_rows; +- +- /* Get some information about our environment. */ +- +- ro_measure_tools(); +- +- return OK; +- } +- +- /* +- * Called when the foreground or background colour has been changed. +- */ +- void +- gui_mch_new_colors() +- { +- } +- +- /* +- * Open the GUI window which was created by a call to gui_mch_init(). +- */ +- int +- gui_mch_open(void) +- { +- int block[10]; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- block[7] = -1; /* Open at the top of the stack */ +- swi(Wimp_OpenWindow, 0, block); +- +- /* Give the new window the input focus */ +- swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); +- +- if (gui_win_x != -1 && gui_win_y != -1) +- gui_mch_set_winpos(gui_win_x, gui_win_y); +- +- return OK; +- } +- +- void +- gui_mch_exit(int rc) +- { +- int block[64]; +- +- /* Close window. Stops us from getting troublesome events +- * if we take a while to die. +- */ +- block[0] = gui.window_handle; +- swi(Wimp_CloseWindow, 0, block); +- +- if (child_handle) +- { +- /* We still have a sub-task running - kill it */ +- block[0] = 20; +- block[3] = 0; +- block[4] = 0; /* Quit */ +- if ((xswi(Wimp_SendMessage, 17, block, child_handle) & v_flag) == 0) +- { +- /* Idle until child dies. */ +- while (child_handle) +- { +- process_event(wimp_poll(1, block), block); +- } +- } +- } +- +- exit(rc); +- } +- +- /* +- * Get the position of the top left corner of the window. +- */ +- int +- gui_mch_get_winpos(int *x, int *y) +- { +- /* TODO */ +- return FAIL; +- } +- +- /* +- * Set the position of the top left corner of the window to the given +- * coordinates. +- */ +- void +- gui_mch_set_winpos(int x, int y) +- { +- /* TODO */ +- } +- +- void +- gui_mch_set_shellsize(width, height, min_width, min_height, base_width, base_height, direction) +- int width; /* In OS units */ +- int height; +- int min_width; /* Smallest permissible window size (ignored) */ +- int min_height; +- int base_width; /* Space for scroll bars, etc */ +- int base_height; +- int direction; +- { +- int s_width, s_height; +- int block[] = { +- gui.window_handle, +- 0, +- -height + 1, +- width, +- 1}; +- +- gui_mch_get_screen_dimensions(&s_width, &s_height); +- s_width -= base_width; +- s_height -= base_height; /* Underestimate - ignores titlebar */ +- +- swi(Wimp_GetWindowState, 0, block); +- block[3] = block[1] + width; +- block[2] = block[4] - height; +- if (block[3] > s_width) +- { +- block[3] = s_width; +- block[1] = block[3] - width; +- } +- if (block[2] < gui.scrollbar_height) +- { +- block[2] = gui.scrollbar_height; +- block[4] = block[2] + height; +- } +- swi(Wimp_OpenWindow, 0, block); +- swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); +- } +- +- void +- gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) +- { +- int block[] = {4, 5, 11, 12, -1}; +- +- swi(OS_ReadVduVariables, block, block); +- *screen_w = (block[2] + 1) << block[0]; +- *screen_h = (block[3] + 1) << block[1]; +- } +- +- /* Take a font name with options and return a font handle, or +- * zero for failure. +- * Replace extension with 'Bold' or 'Italic' depending on modifiers. +- */ +- int +- ro_get_font(fullname, weight) +- char_u *fullname; +- int weight; /* Initial weights: +- * BIT MEANING +- * 0 bold +- * 1 italic +- */ +- { +- char_u *arg; +- char_u font[41]; +- int width = -1; +- int height = -1; +- int name_len; +- int i; +- char_u c; +- +- for (i = 0; i < 39;) +- { +- c = fullname[i]; +- if (c == ':' || c == NUL || c == '.') +- break; +- font[i++] = c; +- } +- +- /* find the first modifier, NULL if none */ +- arg = strchr(fullname + i, ':'); +- +- while (arg) +- { +- switch (*++arg) +- { +- case 'h': +- height = strtol(arg + 1, (char **) &arg, 10); +- break; +- case 'w': +- width = strtol(arg + 1, (char **) &arg, 10); +- break; +- case 'b': +- weight |= 1; +- break; +- case 'i': +- weight |= 2; +- break; +- default: +- return 0; +- } +- arg = strchr(arg, ':'); +- } +- +- if ((weight & 1) && i < 35) +- { +- /* Bold goes instead of given suffix */ +- strncpy(font + i, ".Bold", 5); +- i += 5; +- } +- else +- { +- /* Copy rest of name unless we are using Bold */ +- while (i < 39) +- { +- c = fullname[i]; +- if (c == ':' || c == NUL) +- break; +- font[i++] = c; +- } +- } +- if ((weight & 2) && i < 32) +- { +- strncpy(font + i, ".Oblique", 8); +- i += 8; +- } +- +- font[i] = 0; +- +- if (height < 1 && width < 1) +- height = width = 10; /* Default to 10pt */ +- else if (height < 1) +- height = width; +- else if (width < 1) +- width = height; +- +- if (xswi(Font_FindFont, 0, font, width << 4, height << 4, 0, 0) & v_flag) +- return NOFONT; /* Can't find font */ +- +- return r0; +- } +- +- /* Load a file into allocated memory and check it is valid. +- * Return a pointer to the allocated block on success. +- */ +- char * +- zap_load_file(name, style) +- char_u *name; /* Name of directory containing styles */ +- char_u *style; /* Name of style within directory */ +- { +- char_u fname[256]; +- char_u *file; +- +- if (strlen(name) + strlen(style) > 254) +- return NULL; /* Names too long */ +- +- sprintf(fname, "%s.%s", name, style); +- +- /* Load the named font in 1bpp format. */ +- if (xswi(OS_File, 13, fname, 0, 0, "VimFonts:") & v_flag || r0 != 1) +- return NULL; /* Error reading file info, or not a file */ +- +- /* Allocate enough memory to load the whole file */ +- file = (char *) alloc(r4); +- if (!file) +- return NULL; /* Out of memory */ +- +- if (xswi(OS_File, 12, fname, file, 0, "VimFonts:") & v_flag) +- return NULL; /* Unable to load file */ +- +- if (strncmp(file, "ZapFont\015", 8) == 0) +- return file; /* Loaded OK! */ +- +- vim_free(file); +- return NULL; /* Not a valid font file */ +- } +- +- /* Load and convert the named font. +- * If name is NULL or a null string then convert the system font. +- * Return OK on success; FAIL and we revert to using the VDU drivers. +- * +- * 'name' is the name of a directory. +- * Tries to load 'name.0', 'name.B', 'name.I' and 'name.IB'. +- */ +- int +- zap_load_font(name) +- char_u *name; +- { +- int i; +- +- /* Free the existing font files, if any */ +- for (i = 0; i < ZAP_STYLES; i++) +- { +- vim_free(zap_file[i]); +- zap_file[i] = NULL; +- } +- +- if (name && *name == '!') +- { +- name++; +- double_height = TRUE; +- } +- else +- double_height = FALSE; +- +- if (name && *name) +- { +- zap_file[ZAP_NORMAL] = zap_load_file(name, "0"); +- if (!zap_file[ZAP_NORMAL]) +- return FAIL; /* Can't load the 'normal' style - error */ +- +- zap_file[ZAP_BOLD] = zap_load_file(name, "B"); +- zap_file[ZAP_ITALIC] = zap_load_file(name, "I"); +- zap_file[ZAP_BITALIC] = zap_load_file(name, "IB"); +- } +- else +- { +- int *header; +- char workarea[16]; +- char *old_wa; +- +- /* Allocate memory for system font (8 x 8 x 256 bits, plus header) */ +- header = (int *) alloc(0x20 + 8 * 256); +- if (header == NULL) +- return FAIL; +- zap_file[ZAP_NORMAL] = (char *) header; +- +- /* Store details about the system font */ +- header[2] = 8; /* Width */ +- header[3] = 8; /* Height */ +- header[4] = 0; /* First char */ +- header[5] = 255; /* Last char */ +- header[6] = header[7] = 0; /* Reserved */ +- +- /* Get system font bitmap */ +- old_wa = zap_redraw_block.r_workarea; +- zap_redraw_block.r_workarea = workarea; +- swi(ZapRedraw_ReadSystemChars, zap_file[ZAP_NORMAL] + 0x20, &zap_redraw_block); +- zap_redraw_block.r_workarea = old_wa; +- } +- +- return ro_zap_redraw_initialise(); +- } +- +- /* +- * Initialise vim to use the font with the given name. +- * Return FAIL if the font could not be loaded, OK otherwise. +- */ +- int +- gui_mch_init_font(char_u *font_name, int fontset) +- { +- int new_handle = 0; /* Use the system font by default */ +- +- if (font_name[0] == '!') +- { +- /* Select a ZapRedraw font */ +- if (zap_load_font(font_name + 1)) +- zap_redraw = TRUE; +- else +- { +- EMSG2(_("E610: Can't load Zap font '%s'"), font_name); +- font_name = "System"; /* Error - use system font */ +- zap_redraw = FALSE; +- } +- } +- else +- { +- zap_redraw = FALSE; +- +- if (font_name) +- { +- /* Extract any extra details about the font */ +- new_handle = ro_get_font(font_name, 0); +- if (!new_handle) +- return FAIL; +- } +- else +- font_name = "System"; +- } +- +- /* Free the previous font, if any */ +- gui_mch_free_font(gui.norm_font); +- gui.norm_font = new_handle; +- gui.char_ascent = 0; +- +- if (new_handle) +- { +- /* Read details about the chosen font */ +- swi(Font_ReadInfo, new_handle); +- +- gui.char_width = r3 - r1; +- gui.char_height = r4 - r2; +- +- font_x_offset = -r1; /* Where to position each char in its box */ +- font_y_offset = -r4; +- +- /* Try to load other fonts for bold, italic, and bold-italic */ +- gui_mch_free_font(gui.bold_font); +- gui.bold_font = ro_get_font(font_name, 1); +- gui_mch_free_font(gui.ital_font); +- gui.ital_font = ro_get_font(font_name, 2); +- gui_mch_free_font(gui.boldital_font); +- gui.boldital_font = ro_get_font(font_name, 3); +- } +- else +- { +- /* Use the system font or ZapRedraw. */ +- if (zap_redraw) +- { +- gui.char_width = zap_redraw_block.r_charw << zap_redraw_block.r_magx; +- gui.char_height = zap_redraw_block.r_charh << zap_redraw_block.r_magy; +- if (double_height) +- gui.char_height <<= 1; +- } +- else +- { +- gui.char_width = 16; +- gui.char_height = 32; +- } +- +- gui_mch_free_font(gui.bold_font); +- gui.bold_font = 0; +- gui_mch_free_font(gui.ital_font); +- gui.ital_font = 0; +- gui_mch_free_font(gui.boldital_font); +- gui.boldital_font = 0; +- } +- hl_set_font_name(font_name); +- +- must_redraw = CLEAR; +- return OK; +- } +- +- /* +- * Adjust gui.char_height (after 'linespace' was changed). +- */ +- int +- gui_mch_adjust_charheight() +- { +- return FAIL; +- } +- +- /* +- * Get a font structure for highlighting. +- */ +- GuiFont +- gui_mch_get_font(name, giveErrorIfMissing) +- char_u *name; +- int giveErrorIfMissing; +- { +- int handle; +- +- if (!name) +- return NOFONT; /* System font if no name */ +- +- handle = ro_get_font(name, 0); +- if (!handle) +- { +- if (giveErrorIfMissing) +- EMSG2(_("E611: Can't use font %s"), name); +- return NOFONT; +- } +- +- return handle; +- } +- +- #if defined(FEAT_EVAL) || defined(PROTO) +- /* +- * Return the name of font "font" in allocated memory. +- * Don't know how to get the actual name, thus use the provided name. +- */ +- char_u * +- gui_mch_get_fontname(font, name) +- GuiFont font; +- char_u *name; +- { +- if (name == NULL) +- return NULL; +- return vim_strsave(name); +- } +- #endif +- +- /* +- * Set the current text font. +- */ +- void +- gui_mch_set_font(GuiFont font) +- { +- ro_current_font = font; +- +- if (font) +- { +- /* Not the system font or ZapRedraw font - select it */ +- swi(Font_SetFont, font); +- } +- } +- +- /* +- * If a font is not going to be used, free its structure. +- */ +- void +- gui_mch_free_font(GuiFont font) +- { +- if (font) +- swi(Font_LoseFont, font); +- } +- +- /* +- * Return the Pixel value (colour) for the given colour name. +- * Return INVALCOLOR for error. +- * NB: I've changed Green for now, since it looked really sick +- */ +- guicolor_T +- gui_mch_get_color(char_u *name) +- { +- int i; +- struct colour +- { +- char_u *name; +- guicolor_T value; +- } colours[] = +- { +- { "Red", grgb(255, 0, 0) }, +- { "LightRed", grgb(255, 0, 0) }, +- { "DarkRed", grgb(139, 0, 0) }, +- +- { "Green", grgb(50, 200, 50) }, +- { "LightGreen", grgb(144, 238, 144) }, +- { "DarkGreen", grgb(0, 100, 0) }, +- { "SeaGreen", grgb(46, 139, 87) }, +- +- { "Blue", grgb(0, 0, 255) }, +- { "LightBlue", grgb(173, 216, 230) }, +- { "DarkBlue", grgb(0, 0, 139) }, +- { "SlateBlue", grgb(160, 90, 205) }, +- +- { "Cyan", grgb(0, 255, 255) }, +- { "LightCyan", grgb(224, 255, 255) }, +- { "DarkCyan", grgb(0, 139, 139) }, +- +- { "Magenta", grgb(255, 0, 255) }, +- { "LightMagenta", grgb(255, 224, 255) }, +- { "DarkMagenta", grgb(139, 0, 139) }, +- +- { "Yellow", grgb(255, 255, 0) }, +- { "LightYellow", grgb(255, 255, 224) }, +- { "DarkYellow", grgb(139, 139, 0) }, +- { "Brown", grgb(165, 42, 42) }, +- +- { "Gray", grgb(190, 190, 190) }, +- { "Grey", grgb(190, 190, 190) }, +- { "LightGray", grgb(211, 211, 211) }, +- { "LightGrey", grgb(211, 211, 211) }, +- { "DarkGray", grgb(169, 169, 169) }, +- { "DarkGrey", grgb(169, 169, 169) }, +- { "Gray10", grgb(26, 26, 26) }, +- { "Grey10", grgb(26, 26, 26) }, +- { "Gray20", grgb(51, 51, 51) }, +- { "Grey20", grgb(51, 51, 51) }, +- { "Gray30", grgb(77, 77, 77) }, +- { "Grey30", grgb(77, 77, 77) }, +- { "Gray40", grgb(102, 102, 102) }, +- { "Grey40", grgb(102, 102, 102) }, +- { "Gray50", grgb(127, 127, 127) }, +- { "Grey50", grgb(127, 127, 127) }, +- { "Gray60", grgb(153, 153, 153) }, +- { "Grey60", grgb(153, 153, 153) }, +- { "Gray70", grgb(179, 179, 179) }, +- { "Grey70", grgb(179, 179, 179) }, +- { "Gray80", grgb(204, 204, 204) }, +- { "Grey80", grgb(204, 204, 204) }, +- { "Gray90", grgb(229, 229, 229) }, +- { "Grey90", grgb(229, 229, 229) }, +- +- { "Black", grgb(0, 0, 0) }, +- { "White", grgb(255, 255, 255) }, +- +- { "Orange", grgb(255, 165, 0) }, +- { "Purple", grgb(160, 32, 240) }, +- { "Violet", grgb(238, 130, 238) }, +- {NULL, 0} +- }; +- +- if (name[0] == '#') +- { +- char *end; +- int c; +- +- c = strtol(name + 1, &end, 16); +- return (guicolor_T) ((c >> 16) & 0xff) | (c & 0xff00) | ((c & 0xff) << 16); +- } +- +- for (i = 0; colours[i].name != NULL; i++) +- { +- if (STRICMP(name, colours[i].name) == 0) +- return colours[i].value; +- } +- if (strnicmp(name, "grey", 4) == 0 || strnicmp(name, "gray", 4) == 0) +- { +- int level = (255 * atoi(name + 4)) / 100; +- return (guicolor_T) grgb(level, level, level); +- } +- return INVALCOLOR; +- } +- +- /* +- * Set the current text colours. +- * If we are using fonts then set the antialiasing colours too. +- */ +- void +- gui_mch_set_colors(guicolor_T fg, guicolor_T bg) +- { +- zap_redraw_colours[0] = bg << 8; /* JK230798, register new background colour */ +- zap_redraw_colours[1] = fg << 8; /* JK230798, register new foreground colour */ +- zap_redraw_update_colours = TRUE; /* JK230798, need update of colour masks */ +- +- swi(ColourTrans_ReturnGCOL, fg << 8); +- gui.fg_colour = r0; +- swi(ColourTrans_ReturnGCOL, bg << 8); +- gui.bg_colour = r0; +- +- if (ro_current_font) +- swi(ColourTrans_SetFontColours, 0, bg << 8, fg << 8, 14); +- } +- +- void +- ro_draw_string(x, y, s, len, flags, clip) +- int x; /* Top-left coord to plot at (x incl, y excl) */ +- int y; /* (screen coords) */ +- char_u *s; /* String to plot */ +- int len; /* Length of string */ +- int flags; /* DRAW_TRANSP, DRAW_BOLD, DRAW_UNDERL */ +- int* clip; /* JK230798, added clip window */ +- { +- if (ro_current_font) +- { +- int fx; +- int flen = len; /* Preserve for underline */ +- +- /* Use the Font manager to paint the string. +- * Must do one char at a time to get monospacing. +- */ +- +- if (flags & DRAW_ITALIC && !gui.ital_font) +- flags |= DRAW_UNDERL; /* No italic - underline instead */ +- +- if ((flags & DRAW_TRANSP) == 0) +- { +- swi(ColourTrans_SetColour, gui.bg_colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, x, y - gui.char_height); +- swi(OS_Plot, 96 + 5, x + len * gui.char_width - 1, y - 1); +- } +- +- fx = x + font_x_offset; +- while (flen--) +- { +- swi(Font_Paint, 0, s++, 0x90, fx, y + font_y_offset, 0, 0, 1); +- fx += gui.char_width; +- } +- } +- else +- { +- if (zap_redraw) +- { +- /* Using fast Zap redraw. */ +- flags = ro_zap_redraw_draw_string(x, y, s, len, flags, clip); +- } +- else +- { +- /* Using the system font */ +- if (flags & DRAW_ITALIC) +- flags |= DRAW_UNDERL; +- +- if ((flags & DRAW_TRANSP) == 0) +- { +- swi(ColourTrans_SetColour, gui.bg_colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, x, y - gui.char_height); +- swi(OS_Plot, 96 + 5, x + len * gui.char_width - 1, y - 1); +- } +- swi(OS_Plot, 4, /* Move the drawing cursor */ +- x, +- y - 1); +- swi(ColourTrans_SetColour, gui.fg_colour, 0, 0, 0, 0); +- swi(OS_WriteN, s, len); +- +- if (flags & DRAW_BOLD) +- { +- swi(OS_Plot, 4, x + (1 << x_eigen_factor), y - 1); +- swi(OS_WriteN, s, len); +- } +- } +- } +- +- if (flags & DRAW_UNDERL) +- { +- if (ro_current_font || zap_redraw) +- swi(ColourTrans_SetColour, gui.fg_colour, 0, 0, 0, 0); +- /* Underlined is the same with all plotting methods */ +- swi(OS_Plot, 4, x, y - gui.char_height); +- swi(OS_Plot, 1, gui.char_width * len, 0); +- } +- } +- +- void +- gui_mch_draw_string(int row, int col, char_u *s, int len, int flags) +- { +- int x, y; /* Workarea x,y */ +- x = col * gui.char_width; +- y = -row * gui.char_height; +- +- if (redraw_block) +- { +- ro_draw_string(x + redraw_block[1], y + redraw_block[4], +- s, len, flags, &redraw_block[7]); /* JK230798, added clip window */ +- } +- else +- { +- int block[44]; +- block[0] = gui.window_handle; +- block[1] = x; +- block[2] = y - gui.char_height; +- block[3] = (col + len) * gui.char_width; +- block[4] = y; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- ro_draw_string(x + block[1], y + block[4], +- s, len, flags, &block[7]); /* JK230798, added clip window */ +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- } +- +- /* +- * Return OK if the key with the termcap name "name" is supported. +- */ +- int +- gui_mch_haskey(char_u *name) +- { +- return FAIL; +- } +- +- void +- gui_mch_beep(void) +- { +- swi(OS_WriteI + 7); +- } +- +- /* +- * Visual bell. +- */ +- void +- gui_mch_flash(int msec) +- { +- /* TODO */ +- } +- +- +- /* +- * Plot a solid rectangle using the given plot action and colour. +- * Coordinates are inclusive and window-relative. +- */ +- void +- plot_rectangle(plot, colour, minx, miny, maxx, maxy) +- int plot; /* OS_Plot action */ +- int colour; +- int minx; +- int miny; +- int maxx; +- int maxy; +- { +- if (redraw_block) +- { +- swi(ColourTrans_SetColour, colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, minx + redraw_block[1], miny + redraw_block[4]); +- swi(OS_Plot, plot, maxx + redraw_block[1], maxy + redraw_block[4]); +- } +- else +- { +- int block[44]; +- block[0] = gui.window_handle; +- block[1] = minx; +- block[2] = miny; +- block[3] = maxx + 1; +- block[4] = maxy + 1; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- swi(ColourTrans_SetColour, colour, 0, 0, 0, 0); +- swi(OS_Plot, 4, minx + block[1], miny + block[4]); +- swi(OS_Plot, plot, maxx + block[1], maxy + block[4]); +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- } +- +- /* +- * Invert a rectangle from row r, column c, for nr rows and nc columns. +- */ +- void +- gui_mch_invert_rectangle(int r, int c, int nr, int nc) +- { +- plot_rectangle(96 + 6, 0, FILL_X(c), -FILL_Y(r + nr), FILL_X(c + nc), -FILL_Y(r)); +- } +- +- /* +- * Iconify the GUI window. +- */ +- void +- gui_mch_iconify(void) +- { +- } +- +- #if defined(FEAT_EVAL) || defined(PROTO) +- /* +- * Bring the Vim window to the foreground. +- */ +- void +- gui_mch_set_foreground() +- { +- /* TODO */ +- } +- #endif +- +- /* Draw a hollow rectangle relative to the current +- * graphics cursor position, with the given width +- * and height. Start position is top-left. +- */ +- void +- draw_hollow(w, h) +- int w; +- int h; +- { +- swi(OS_Plot, 1, w - 1, 0); +- swi(OS_Plot, 1, 0, 1 - h); +- swi(OS_Plot, 1, 1 - w, 0); +- swi(OS_Plot, 1, 0, h - 1); +- } +- +- /* +- * Draw a cursor without focus. +- */ +- void +- gui_mch_draw_hollow_cursor(guicolor_T colour) +- { +- int x = FILL_X(gui.cursor_col); /* Window relative, top-left */ +- int y = -FILL_Y(gui.cursor_row); +- if (redraw_block == NULL) +- { +- int block[11]; +- +- block[0] = gui.window_handle; +- block[1] = x; +- block[2] = y - gui.char_height; +- block[3] = x + gui.char_width; +- block[4] = y; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- swi(ColourTrans_SetGCOL, colour << 8, 0, 0, 0, 0); +- +- swi(OS_Plot, 4, x + block[1], y + block[4] - 1); +- draw_hollow(gui.char_width, gui.char_height); +- +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- else +- { +- swi(ColourTrans_SetGCOL, colour << 8, 0, 0, 0, 0); +- +- swi(OS_Plot, 4, x + redraw_block[1], y + redraw_block[4] - 1); +- draw_hollow(gui.char_width, gui.char_height); +- } +- } +- +- /* +- * Draw part of a cursor, "w" pixels wide, and "h" pixels high, using +- * color "color". +- */ +- void +- gui_mch_draw_part_cursor(w, h, colour) +- int w; +- int h; +- guicolor_T colour; +- { +- int x = FILL_X(gui.cursor_col); +- int y = -FILL_Y(gui.cursor_row); +- swi(ColourTrans_ReturnGCOL, colour << 8); +- plot_rectangle(96 + 5, r0, x, y - h, x + w - 1, y - 1); +- } +- +- /* +- * Catch up with any queued events. This may put keyboard input into the +- * input buffer, call resize call-backs, trigger timers etc. +- * If there is nothing in the event queue(& no timers pending), then we return +- * immediately (well, after a Wimp_Poll). +- */ +- void +- gui_mch_update(void) +- { +- int block[64]; +- int reason; +- +- swi(OS_ReadMonotonicTime); +- if ((r0 - time_of_last_poll) < 50) +- return; /* Don't return too often */ +- +- reason = wimp_poll(0, block); +- if (reason) +- process_event(reason, block); +- ro_return_early = FALSE; /* We're returning anyway. */ +- } +- +- void +- redraw_window(block) +- int *block; +- { +- int x, y; /* Vim workarea coords */ +- int width, height; +- int blank_col; +- +- swi(ColourTrans_ReturnGCOL, UNUSED_COLOUR << 8, 0, 0, 1<<7, 0); +- blank_col = r0; +- +- swi(Wimp_RedrawWindow, 0, block); +- redraw_block = block; +- while (r0) +- { +- x = block[7] - block[1]; +- y = block[4] - block[10]; +- width = block[9] - block[7]; +- height = block[10] - block[8]; +- +- if (height + y > Rows * gui.char_height) +- { +- /* Blank everything off the bottom. */ +- plot_rectangle(96 + 5, blank_col, +- 0, block[8] - block[4], +- block[9] - block[1], -FILL_Y(Rows) - 1); +- height = Rows * gui.char_height; +- } +- if (width + x> Columns * gui.char_width) +- { +- /* Blank everything off to the right. */ +- plot_rectangle(96 + 5, blank_col, +- FILL_X(Columns), block[8] - block[4], +- block[9] - block[1], 0); +- width = Columns * gui.char_width; +- } +- gui_redraw(x , y, width, height); +- swi(Wimp_GetRectangle, 0, block); +- } +- redraw_block = NULL; +- } +- +- /* Check if we have modified data. +- * If we do then ack the message to stop the shutdown. +- * Otherwise, ignore the message. +- */ +- void +- ro_prequit(block) +- int *block; +- { +- if (!ro_ok_to_quit()) +- { +- /* Not OK to quit - stop shutdown */ +- block[3] = block[2]; +- swi(Wimp_SendMessage, 19, block, block[1]); +- } +- /* Do nothing. We may get a Message_Quit later. */ +- } +- +- /* If there is unsaved data then ask the user if they mind losing it. +- * Return TRUE if we can quit without saving, FALSE to halt the +- * shutdown. +- */ +- int +- ro_ok_to_quit() +- { +- int old_confirm = cmdmod.confirm; +- +- cmdmod.confirm = FALSE; /* Use our own, single tasking, box */ +- +- if (check_changed_any(FALSE)) +- { +- swi(Wimp_ReportError, +- "\0\0\0\0Vim contains unsaved data - quit anyway?", +- 0x17, +- "Vim"); +- cmdmod.confirm = old_confirm; +- if (r1 != 1) +- return FALSE; +- } +- cmdmod.confirm = old_confirm; +- return TRUE; +- } +- +- /* Quit without checking for unsaved data. */ +- void +- ro_quit() +- { +- exiting = TRUE; +- getout(0); +- +- exiting = FALSE; /* probably can't get here */ +- setcursor(); /* position cursor */ +- out_flush(); +- } +- +- /* Insent the given vim special code into the input buffer */ +- void +- ro_press(a, b, modifier) +- char a; +- char b; +- int modifier; /* % 0000 0000 */ +- { +- char_u buf[6]; +- int vim_mod; +- int key; +- +- +- /* Convert RISC OS modifier to Vim modifier. */ +- vim_mod = ((modifier & 0x10) ? MOD_MASK_SHIFT : 0) +- | ((modifier & 0x20) ? MOD_MASK_CTRL : 0); +- key = simplify_key(TERMCAP2KEY(a, b), &vim_mod); +- +- buf[3] = CSI; +- buf[4] = KEY2TERMCAP0(key); +- buf[5] = KEY2TERMCAP1(key); +- if (vim_mod) +- { +- buf[0] = CSI; +- buf[1] = KS_MODIFIER; +- buf[2] = vim_mod; +- add_to_input_buf(buf, 6); +- } +- else +- add_to_input_buf(buf + 3, 3); +- } +- +- /* Take a wimp key code and insert the vim equivalent +- * into vim's input buffer. +- * CTRL-C also sets got_int. +- */ +- void +- ro_insert_key(code) +- char_u *code; /* Wimp_ProcessKey code (4 bytes) */ +- { +- char a = code[0]; +- char b = code[1]; +- int base, modifier; +- +- if (a == 3 && ctrl_c_interrupts) +- got_int = TRUE; +- +- /* Is it a normal key? */ +- if (a > 31 && a < 127) +- { +- add_to_input_buf(code, 1); +- return; +- } +- +- /* We should pass any unrecognised keys on, but +- * for now just pass on F12 combinations. +- */ +- switch (b) +- { +- case 0: +- /* Home and Delete are the only special cases */ +- switch (a) +- { +- case 0x1e: +- ro_press('k','h', 0); /* Home */ +- return; +- case 0x7f: +- ro_press('k','D', 0); /* Delete */ +- return; +- case CSI: +- { +- /* Turn CSI into K_CSI. Untested! */ +- char_u string[3] = {CSI, KS_EXTRA, KE_CSI}; +- +- add_to_input_buf(string, 3); +- return; +- } +- default: +- add_to_input_buf(code, 1); +- return; +- } +- case 1: +- if ((a & 0xcf) == 0xcc) +- { +- /* F12 pressed - pass it on (quick hack) */ +- swi(Wimp_ProcessKey, a | 0x100); +- return; +- } +- base = a & 0xcf; +- modifier = a & 0x30; +- switch (base) +- { +- case 0x8a: /* Tab */ +- add_to_input_buf("\011", 1); +- return; +- case 0x8b: /* Copy (End) */ +- return ro_press('@', '7', modifier); +- case 0x8c: /* Left */ +- return ro_press('k', 'l', modifier); +- case 0x8d: /* Right */ +- return ro_press('k', 'r', modifier); +- case 0x8e: /* Down */ +- if (modifier & 0x10) +- return ro_press('k', 'N', modifier ^ 0x10); +- else +- return ro_press('k', 'd', modifier); +- case 0x8f: /* Up */ +- if (modifier & 0x10) +- return ro_press('k', 'P', modifier ^ 0x10); +- else +- return ro_press('k', 'u', modifier); +- case 0xca: /* F10 */ +- return ro_press('k', ';', modifier); +- case 0xcb: /* F11 */ +- return ro_press('F', '1', modifier); +- case 0xcd: /* Insert */ +- return ro_press('k', 'I', modifier); +- default: +- if (base > 0x80 && base < 0x18a) +- { +- /* One of the other function keys */ +- return ro_press('k', '0' + (base & 15), modifier); +- } +- } +- } +- } +- +- /* Process a mouse event. */ +- void +- ro_mouse(block) +- int *block; +- { +- int x, y, button, vim_button; +- int modifiers = 0; +- int min_x, min_y; /* Visible area of editor window */ +- int max_x, max_y; +- +- if (block[3] != gui.window_handle || ro_dragging) +- return; /* Not our window or ignoring clicks*/ +- +- x = block[0]; /* Click position - screen coords */ +- y = block[1]; +- button = block[2]; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- min_x = block[1]; +- min_y = block[2]; +- max_x = block[3]; +- max_y = block[4]; +- +- if (block[3] - x < gui.scrollbar_width) +- { +- /* Click in that blank area under the scrollbars */ +- +- if (button & 0x444) +- { +- int front_block[64]; +- /* Dragging with Select - bring window to front first */ +- front_block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, front_block); +- front_block[7] = -1; +- ro_open_main(front_block); +- } +- +- block[0] = gui.window_handle; +- block[1] = 7; /* Drag point */ +- block[2] = block[4] = 0; /* Coords of point. */ +- block[3] = block[5] = 0; +- drag_x_offset = max_x - x; +- drag_y_offset = min_y - y; +- +- /* Parent box. */ +- block[6] = min_x + +- gui.scrollbar_width * 2 + +- MIN_COLUMNS * gui.char_width; +- block[7] = 0; +- gui_mch_get_screen_dimensions(&block[8], &block[9]); +- block[9] = max_y - +- 4 * gui.char_height - +- gui.scrollbar_height; +- +- swi(Wimp_DragBox, 0, block); +- ro_dragging = DRAG_RESIZE_WINDOW; +- drag_button = vim_button; +- drag_modifiers = modifiers; +- return; +- } +- +- if (button & 0x111) +- vim_button = MOUSE_RIGHT; +- else if (button & 0x222) +- vim_button = MOUSE_MIDDLE; +- else +- vim_button = MOUSE_LEFT; +- +- swi(OS_Byte, 121, 0x80); +- if (r1 == 0xff) +- modifiers |= MOUSE_SHIFT; +- swi(OS_Byte, 121, 0x81); +- if (r1 == 0xff) +- modifiers |= MOUSE_CTRL; +- swi(OS_Byte, 121, 0x82); +- if (r1 == 0xff) +- modifiers |= MOUSE_ALT; +- +- if (button == 2) +- { +- /* Menu click: +- * If shift was pressed then do the paste action. +- * If not, then open the pop-up menu. +- */ +- modifiers ^= MOUSE_SHIFT; +- if (modifiers && MOUSE_SHIFT) +- { +- vimmenu_T main; +- /* Shift was NOT pressed - show menu */ +- main.dname = (char_u *) "Vim"; +- main.children = root_menu; +- gui_mch_show_popupmenu(&main); +- return; +- } +- } +- +- /* Gain the input focus */ +- swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); +- +- if (button & 0xf0) +- { +- /* Drag operation: +- * +- * Tell the Wimp to start a drag. +- * Monitor null events. +- */ +- block[1] = 7; /* Drag a point. */ +- block[2] = block[4] = x; /* Coords of point. */ +- block[3] = block[5] = y; +- block[6] = 0; /* Coords of bounding box. */ +- block[7] = 0; +- gui_mch_get_screen_dimensions(&block[8], &block[9]); +- +- drag_x_offset = drag_y_offset = 0; +- +- swi(Wimp_DragBox, 0, block); +- ro_dragging = DRAG_SELECTION; +- drag_button = vim_button; +- drag_modifiers = modifiers; +- +- vim_button |= MOUSE_DRAG; +- } +- +- gui_send_mouse_event( +- vim_button, +- x - min_x, +- max_y - y, +- button & 0xf ? TRUE : FALSE, /* dclick */ +- modifiers); +- } +- +- void +- ro_continue_drag(block) +- int *block; /* Just used as scrap. */ +- { +- int x, y; +- +- /* Get screen coords of pointer. */ +- swi(Wimp_GetPointerInfo, 0, block); +- x = block[0] + drag_x_offset; +- y = block[1] + drag_y_offset; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- +- if (ro_dragging == DRAG_RESIZE_WINDOW) +- { +- /* Resizing the main window. */ +- block[2] = y; +- block[3] = x; +- ro_open_main(block); +- } +- else +- { +- /* Selecting some text. */ +- gui_send_mouse_event( +- drag_button | MOUSE_DRAG, /* Always report the same button */ +- x - block[1], +- block[4] - y, +- FALSE, /* Not a double click. */ +- drag_modifiers); +- } +- } +- +- /* User has released all mouse buttons, marking the end of a drag. */ +- void +- ro_drag_finished(block) +- int *block; +- { +- int x; +- int y; +- int width, height; +- +- /* I don't trust the box returned by Wimp_Poll; look at the pointer +- * ourselves. +- */ +- swi(Wimp_GetPointerInfo, 0, block); +- x = block[0] + drag_x_offset; +- y = block[1] + drag_y_offset; +- +- if (ro_dragging == DRAG_RESIZE_WINDOW) +- { +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- block[2] = y; +- block[3] = x; +- ro_open_main(block); +- +- width = (block[3] - block[1]); +- height = (block[4] - block[2]); +- +- swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); +- gui_resize_shell(width, height); +- } +- else +- { +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- gui_send_mouse_event( +- MOUSE_RELEASE, +- x - block[1], +- block[4] - y, +- FALSE, /* not a double click */ +- drag_modifiers); +- } +- ro_dragging = DRAG_FALSE; +- } +- +- /* Load the file/pathname given in block into a [new] buffer. +- * +- * Modifier Action +- * +- * None :confirm e +- * Ctrl :sp +- * Shift +- * +- * Insert into typebuf, at the start. +- * If loading from !Scrap then use saved leafname instead, and +- * delete the scrap file. Also, ignore shift key. +- * +- * NB: Doesn't send DataLoadAck (other app might delete temp file?). +- */ +- void +- ro_dataload(block) +- int *block; +- { +- char_u new_path[MAXPATHL]; +- char_u *path = ((char_u *) block) + 44; +- int scrap = FALSE; +- +- if (block[3] == leaf_ref && leaf_name) +- scrap = TRUE; +- +- switch (get_real_state() & 0xff) +- { +- case INSERT: +- case CMDLINE: +- case CMDLINE+LANGMAP: +- /* For insert mode we can only insert the pathname (currently) +- * Make sure Shift is pressed. +- */ +- swi(OS_Byte, 121, 0x80); /* Is Shift pressed? */ +- if (r1 == 0xff) +- { +- ins_typebuf(" ", REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(path, REMAP_NONE, 0, TRUE, FALSE); +- ro_return_early = TRUE; /* Return even though nothing was typed. */ +- } +- else +- swi(Wimp_ReportError, +- "\0\0\0\0Sorry, you can only load text in normal mode", 5, "Vim"); +- break; +- +- case NORMAL: +- ro_return_early = TRUE; /* Return even though nothing was typed. */ +- +- if (scrap) /* Remove . Later. */ +- ins_typebuf(":!~remove \r", REMAP_NONE, 0, TRUE, FALSE); +- +- /* Insert {:sp ,:confirm e }[+f\ ] */ +- ins_typebuf("\r", REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(path, REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(" ", REMAP_NONE, 0, TRUE, FALSE); +- +- if (scrap) +- { +- /* Loading via !Scrap - change pathname to stored leafname */ +- ins_typebuf(leaf_name, REMAP_NONE, 0, TRUE, FALSE); +- ins_typebuf(" +f\\ ", REMAP_NONE, 0, TRUE, FALSE); +- leaf_ref = 0; +- vim_free(leaf_name); +- leaf_name = NULL; +- } +- +- swi(OS_Byte, 121, 0x81); /* Is Ctrl pressed? */ +- if (r1 == 0xff) +- /* Yes, split window */ +- ins_typebuf(":sp", REMAP_NONE, 0, TRUE, FALSE); +- else +- ins_typebuf(":confirm e", REMAP_NONE, 0, TRUE, FALSE); +- break; +- +- default: +- swi(Wimp_ReportError, "\0\0\0\0You can only load text in normal mode.", 5, "Vim"); +- } +- /* Send DataSaveAck so other program doesn't think we died +- * and delete . +- */ +- block[3] = block[2]; +- block[4] = 4; +- swi(Wimp_SendMessage, 17, block, block[1]); +- } +- +- void +- ro_datasave(block) +- int *block; +- { +- char_u *path = ((char_u *) block) + 44; +- +- /* Preserve the name given so we can use it, not */ +- if (leaf_name) +- vim_free(leaf_name); +- leaf_name = vim_strsave(path); +- +- block[9] = -1; /* File is unsafe. */ +- strcpy(path, ""); +- block[0] = 60; +- block[3] = block[2]; +- block[4] = 2; +- swi(Wimp_SendMessage, 17, block, block[1]); +- +- leaf_ref = block[2]; +- } +- +- void +- ro_message(block) +- int *block; +- { +- char_u *buffer; +- long_u len; +- +- if (block[1] == task_handle) +- return; /* Don't talk to ourself! */ +- switch (block[4]) +- { +- case 0: /* Quit. */ +- if (block[4] == 0) +- ro_quit(); +- break; +- case 1: /* DataSave */ +- ro_datasave(block); +- break; +- case 2: /* DataSaveAck. */ +- if (clip_convert_selection(&buffer, &len, &clip_star) == -1) +- return; +- +- /* Save the clipboard contents to a file. */ +- swi(OS_File, 10, ((char_u *) block) + 44, 0xfff, 0, buffer, buffer + len); +- +- /* Ack with DataLoad message. */ +- block[3] = block[2]; +- block[4] = 3; +- block[9] = len; +- swi(Wimp_SendMessage, 17, block, block[1]); +- +- vim_free(buffer); +- break; +- case 3: /* DataLoad */ +- ro_dataload(block); +- break; +- case 8: /* PreQuit */ +- ro_prequit(block); +- break; +- case 0xf: /* Lose clipboard. */ +- if (block[5] & 4) +- { +- clip_free_selection(&clip_star); +- clip_star.owned = FALSE; +- } +- break; +- case 0x10: /* DataRequest (clip_star) */ +- if (clip_star.owned) +- { +- int rows; +- +- /* Tell other program that we have the clipboard. */ +- block[0] = 52; +- block[3] = block[2]; /* Copy myref to yourref. */ +- block[4] = 1; /* DataSave message. */ +- /* Create an estimate for the size (larger or same as true +- * value) */ +- rows = clip_star.end.lnum - clip_star.start.lnum; +- if (rows < 0) +- rows = -rows; +- block[9] = (rows + 1) * Columns + 1; /* Add one for possible +- final newline. */ +- block[10] = 0xfff; /* Clipboard is text. */ +- strcpy( ((char_u *) block) + 44, "VimClip"); +- swi(Wimp_SendMessage, 17, block, block[1]); +- } +- break; +- case 0x400c1: /* Mode change */ +- changed_mode = TRUE; /* Flag - update on next OpenWindow */ +- if (zap_redraw) +- { +- /* JK230798, re-initialise ZapRedraw stuff */ +- if (ro_zap_redraw_initialise() == FAIL) +- zap_redraw = FALSE; +- } +- break; +- case 0x400c3: /* TaskCloseDown */ +- if (block[1] == child_handle) +- child_handle = 0; +- break; +- } +- } +- +- /* +- * Converts a scrollbar's window handle into a scrollbar pointer. +- * NULL on failure. +- */ +- scrollbar_T * +- ro_find_sbar(id) +- int id; +- { +- win_T *wp; +- +- if (gui.bottom_sbar.id == id) +- return &gui.bottom_sbar; +- FOR_ALL_WINDOWS(wp) +- { +- if (wp->w_scrollbars[SBAR_LEFT].id == id) +- return &wp->w_scrollbars[SBAR_LEFT]; +- if (wp->w_scrollbars[SBAR_RIGHT].id == id) +- return &wp->w_scrollbars[SBAR_RIGHT]; +- } +- return NULL; +- } +- +- void +- scroll_to(line, sb) +- int sb; /* Scrollbar number */ +- int line; +- { +- char_u code[8]; +- +- /* Don't put events in the input queue now. */ +- if (hold_gui_events) +- return; +- +- /* Send a scroll event: +- * +- * A scrollbar event is CSI (NOT K_SPECIAL), KS_VER_SCROLLBAR, +- * KE_FILLER followed by: +- * one byte representing the scrollbar number, and then four bytes +- * representing a long_u which is the new value of the scrollbar. +- */ +- code[0] = CSI; +- code[1] = KS_VER_SCROLLBAR; +- code[2] = KE_FILLER; +- code[3] = sb; +- code[4] = line >> 24; +- code[5] = line >> 16; +- code[6] = line >> 8; +- code[7] = line; +- add_to_input_buf(code, 8); +- } +- +- void +- h_scroll_to(col) +- int col; +- { +- char_u code[8]; +- +- /* Don't put events in the input queue now. */ +- if (hold_gui_events) +- return; +- +- /* Send a scroll event: +- * +- * A scrollbar event is CSI (NOT K_SPECIAL) +- * +- * A horizontal scrollbar event is K_SPECIAL, KS_HOR_SCROLLBAR, +- * KE_FILLER followed by four bytes representing a long_u which is the +- * new value of the scrollbar. +- */ +- code[0] = CSI; +- code[1] = KS_HOR_SCROLLBAR; +- code[2] = KE_FILLER; +- code[4] = col >> 24; +- code[5] = col >> 16; +- code[6] = col >> 8; +- code[7] = col; +- add_to_input_buf(code, 8); +- } +- +- void +- ro_scroll(block) +- int *block; +- { +- scrollbar_T *sb; +- int offset; +- win_T *wp; +- +- /* Block is ready for Wimp_OpenWindow, and also contains: +- * +- * +32 = scroll X direction (-2 .. +2) +- * +36 = scroll Y direction (-2 .. +2) +- */ +- +- sb = ro_find_sbar(block[0]); +- if (!sb) +- return; /* Window not found (error). */ +- +- wp = sb-> wp; +- +- if (wp == NULL) +- { +- /* Horizontal bar. */ +- offset = block[8]; +- if (offset == -2) +- offset = (block[1] - block[3]) / gui.char_width; +- else if (offset == 2) +- offset = (block[3] - block[1]) / gui.char_width; +- +- block[5] += offset * gui.char_width; +- +- gui_drag_scrollbar(sb, block[5] / gui.char_width, FALSE); +- +- swi(Wimp_OpenWindow, 0, block); +- } +- else +- { +- offset = -block[9]; +- if (offset == -2) +- offset = -(wp -> w_height - 1); +- else if (offset == 2) +- offset = wp -> w_height - 1; +- +- /* Possibly we should reposition the scrollbar? +- * Vim seems to update the bar anyway... +- */ +- gui_drag_scrollbar(sb, offset - (block[6] / gui.char_height), FALSE); +- } +- } +- +- /* Move a window by a given offset. Used to simulate the function of the +- * nested wimp. +- */ +- void +- ro_move_child(window, x, y, pos_wanted, pos_got) +- int window; +- int x,y; /* offset to move by */ +- int pos_wanted, pos_got; +- { +- int block[10]; +- +- block[0] = window; +- swi(Wimp_GetWindowState, 0, block); +- block[1] += x; +- block[2] += y; +- block[3] += x; +- block[4] += y; +- if (pos_wanted == -1) +- block[7] = -1; +- else if (pos_wanted == -2) +- block[7] = pos_got; +- swi(Wimp_OpenWindow, 0, block); +- } +- +- /* Open the main window. Also updates scrollbars if we are not +- * using the nested Wimp. +- * If we have just changed mode then re-read all values. +- */ +- void +- ro_open_main(block) +- int *block; +- { +- int toggle_size; +- +- /* Find out if the user clicked on the toggle size icon. */ +- block[20] = block[0]; +- swi(Wimp_GetWindowState, 0, block + 20); +- toggle_size = block[28] & (1 << 19); +- +- if (nested_wimp) +- { +- swi(Wimp_OpenWindow, 0, block); +- } +- else +- { +- int old[10]; +- int x_offset, y_offset; /* Move children same as parent. */ +- int pos_wanted, pos_got; +- int left_bar = gui.which_scrollbars[SBAR_LEFT]; +- int right_bar = gui.which_scrollbars[SBAR_RIGHT]; +- win_T *wp; +- +- /* Three cases to think about: +- * 1) Move to top. Open each window at the top. +- * 2) Same stack position. Open each with same position. +- * 3) Open at bottom. Open children with parent's new position. +- */ +- +- old[0] = block[0]; +- swi(Wimp_GetWindowState, 0, old); +- pos_wanted = block[7]; +- swi(Wimp_OpenWindow, 0, block); +- /* Block updated by OpenWindow? I don't think so! */ +- swi(Wimp_GetWindowState, 0, block); +- pos_got = block[7]; +- +- x_offset = block[1] - old[1]; +- y_offset = block[4] - old[4]; +- if (x_offset || y_offset || pos_wanted == -1 || pos_wanted == -2) +- { +- /* If parent has moved, re-open all the child windows. */ +- FOR_ALL_WINDOWS(wp) +- { +- /* Reopen scrollbars for this window. */ +- if (left_bar) +- ro_move_child(wp -> w_scrollbars[SBAR_LEFT].id, +- x_offset, y_offset, +- pos_wanted, pos_got); +- if (right_bar) +- ro_move_child(wp -> w_scrollbars[SBAR_RIGHT].id, +- x_offset, y_offset, +- pos_wanted, pos_got); +- } +- } +- } +- if (changed_mode || toggle_size) +- { +- int width, height; +- +- if (changed_mode) +- ro_measure_tools(); +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- +- width = block[3] - block[1]; +- height = block[4] - block[2]; +- swi(Wimp_ForceRedraw, gui.window_handle, 0, -height, width, 0); +- gui_resize_shell(width, height); +- changed_mode = FALSE; +- } +- } +- +- void +- ro_open_window(block) +- int *block; +- { +- int pos; +- scrollbar_T *sb; +- +- if (block[0] == gui.window_handle) +- ro_open_main(block); +- else +- { +- swi(Wimp_OpenWindow, 0, block); +- if (block[0] != gui.window_handle) +- { +- sb = ro_find_sbar(block[0]); +- if (sb) +- { +- if (sb-> wp != NULL) +- gui_drag_scrollbar(sb, -block[6] / gui.char_height, FALSE); +- else +- gui_drag_scrollbar(sb, block[5] / gui.char_width, FALSE); +- } +- } +- } +- } +- +- void +- ro_menu_selection(block) +- int *block; +- { +- int *item = wimp_menu + 7; +- vimmenu_T *menu; +- /* wimp_menu points to a wimp menu structure */ +- +- for (;;) +- { +- while (block[0]--) +- item += 6; +- if (block[1] == -1) +- break; +- item = ((int *) item[1]) + 7; +- block++; +- } +- /* item points to the wimp menu item structure chosen */ +- menu = (vimmenu_T *) item[5]; +- +- swi(Wimp_GetPointerInfo, 0, block); +- if (block[2] == 1) +- /* Adjust used - keep menu open */ +- swi(Wimp_CreateMenu, 0, wimp_menu); +- +- if (menu-> cb) +- menu-> cb(menu); +- } +- +- void +- ro_open_parent() +- { +- int head; +- char_u *i = curbuf-> b_ffname; +- char_u buffer[256]; +- +- head = 0; +- for (; *i; i++) +- { +- if (*i == '.') +- head = i - curbuf-> b_ffname; +- } +- +- /* Append head chars to buffer */ +- if (head < 240 && curbuf-> b_ffname && head) +- { +- strcpy(buffer, "%filer_opendir "); +- strncpy(buffer + 15, curbuf-> b_ffname, head); +- buffer[15 + head] = '\0'; +- swi(OS_CLI, buffer); +- } +- } +- +- void +- process_event(event, block) +- int event; +- int *block; +- { +- switch (event) +- { +- case 0: /* Nothing - update drag state. */ +- if (ro_dragging) +- ro_continue_drag(block); +- break; +- case 1: /* Redraw window. */ +- redraw_window(block); +- break; +- case 2: /* Open window. */ +- ro_open_window(block); +- break; +- case 3: /* Close window. */ +- swi(Wimp_GetPointerInfo, 0, block + 1); +- if (block[3] == 1) +- ro_open_parent(); +- else +- if (ro_ok_to_quit()) +- ro_quit(); +- break; +- case 6: /* Mouse click. */ +- ro_mouse(block); +- break; +- case 7: /* Finished drag. */ +- ro_drag_finished(block); +- break; +- case 8: /* Key pressed. */ +- ro_insert_key((char_u *) &block[6]); +- break; +- case 9: +- ro_menu_selection(block); +- break; +- case 10: /* Scroll request. */ +- ro_scroll(block); +- break; +- case 11: /* Lose caret. */ +- if (block[0] == gui.window_handle) +- gui_focus_change(FALSE); +- break; +- case 12: /* Gain caret. */ +- if (block[0] == gui.window_handle) +- gui_focus_change(TRUE); +- break; +- case 17: /* User message. */ +- case 18: /* User message recorded. */ +- ro_message(block); +- break; +- } +- } +- +- /* +- * GUI input routine called by gui_wait_for_chars(). Waits for a character +- * from the keyboard. +- * wtime == -1 Wait forever. +- * wtime == 0 This should never happen. +- * wtime > 0 Wait wtime milliseconds for a character. +- * Returns OK if a character was found to be available within the given time, +- * or FAIL otherwise. +- */ +- int +- gui_mch_wait_for_chars(long wtime) +- { +- int block[64]; +- int reason; +- int start_time = -1; +- int ctime = wtime / 10; /* delay in cs */ +- +- if (wtime != -1) +- { +- swi(OS_ReadMonotonicTime); +- start_time = r0; +- } +- +- for (;;) +- { +- if (ro_dragging) +- reason = wimp_poll(0, block); /* Always return immediately */ +- else if (wtime == -1) +- reason = wimp_poll(1, block); +- else +- reason = wimp_pollidle(0, block, start_time + ctime); +- +- process_event(reason, block); +- +- if (input_available() || ro_return_early) +- { +- ro_return_early = FALSE; +- return OK; /* There is something to process (key / menu event) */ +- } +- +- if (wtime != -1) +- { +- swi(OS_ReadMonotonicTime); +- if (r0 - start_time > ctime) +- return FAIL; /* We've been waiting too long - return failure */ +- } +- } +- } +- +- /* Flush any output to the screen */ +- void +- gui_mch_flush(void) +- { +- } +- +- /* +- * Clear a rectangular region of the screen from text pos(row1, col1) to +- * (row2, col2) inclusive. +- */ +- void +- gui_mch_clear_block(int row1, int col1, int row2, int col2) +- { +- swi(ColourTrans_ReturnGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); +- plot_rectangle(96 + 5, r0, +- FILL_X(col1), -FILL_Y(row2 + 1), +- FILL_X(col2 + 1), -FILL_Y(row1)); +- } +- +- void +- gui_mch_clear_all(void) +- { +- if (redraw_block) +- { +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); +- swi(OS_WriteI + 16); +- } +- else +- { +- int block[44]; +- block[0] = gui.window_handle; +- block[1] = 0; +- block[2] = -gui.num_rows * gui.char_height; +- block[3] = gui.num_cols * gui.char_width; +- block[4] = 0; +- swi(Wimp_UpdateWindow, 0, block); +- while (r0) +- { +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 1<<7, 0); +- swi(OS_WriteI + 16); +- swi(Wimp_GetRectangle, 0, block); +- } +- } +- } +- +- /* +- * Delete the given number of lines from the given row, scrolling up any +- * text further down within the scroll region. +- */ +- void +- gui_mch_delete_lines(int row, int num_lines) +- { +- int top_from = -row - num_lines; +- int bot_from = -gui.scroll_region_bot - 1; +- int bot_to = bot_from + num_lines; +- +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 0x80, 0); +- +- /* Changed without checking! */ +- swi(Wimp_BlockCopy, gui.window_handle, +- gui.scroll_region_left * gui.char_width, +- bot_from * gui.char_height, +- (gui.scroll_region_right - gui.scroll_region_left +- + 1) * gui.char_width, +- top_from * gui.char_height, +- +- gui.scroll_region_left * gui.char_width, +- bot_to * gui.char_height); +- +- gui_clear_block(gui.scroll_region_bot - num_lines + 1, +- gui.scroll_region_left, +- gui.scroll_region_bot, gui.scroll_region_right); +- } +- +- /* +- * Insert the given number of lines before the given row, scrolling down any +- * following text within the scroll region. +- */ +- void +- gui_mch_insert_lines(int row, int num_lines) +- { +- int top_from = -row; +- int bot_to = -gui.scroll_region_bot - 1; +- int bot_from = bot_to + num_lines; +- +- swi(ColourTrans_SetGCOL, gui.back_pixel << 8, 0, 0, 0x80, 0); +- +- swi(Wimp_BlockCopy, gui.window_handle, +- gui.scroll_region_left * gui.char_width, +- bot_from * gui.char_height, +- (gui.scroll_region_right - gui.scroll_region_left +- + 1) * gui.char_width, +- top_from * gui.char_height, +- +- gui.scroll_region_left * gui.char_width, +- bot_to * gui.char_height); +- +- gui_clear_block(row, gui.scroll_region_left, +- row + num_lines - 1, gui.scroll_region_right); +- } +- +- /* Put selection in clipboard buffer. +- * Should we become the new owner? +- */ +- void +- clip_mch_request_selection(VimClipboard *cbd) +- { +- int block[64]; /* Will be used in Wimp_Poll. */ +- int reason; +- char_u *buffer; +- long_u length; +- +- block[0] = 48; /* Size of block. */ +- block[3] = 0; /* Original message. */ +- block[4] = 0x10; /* Data request. */ +- block[5] = gui.window_handle; +- block[6] = RO_LOAD_CLIPBOARD; /* Internal handle. */ +- block[7] = block[8] = 0; /* (x,y) not used. */ +- block[9] = 4; +- block[10] = 0xfff; /* We want text files if possible, I think. */ +- block[11] = -1; /* End of list. */ +- swi(Wimp_SendMessage, 17, block, 0); /* Broadcast request. */ +- +- /* OK, we've sent the request. Poll until we get a null poll (failure) or +- * we load the clipboard. +- * If we receive a DataSave event with icon handle = -2 then put it on the +- * clipboard. RISC OS should ensure that key events will not be delivered +- * until the clipboard operation completes (unless the owner starts idling +- * - we can't wait forever!). +- */ +- for (;;) +- { +- reason = wimp_poll(0, block); +- if (reason == 0) +- return; /* Failed to get clipboard. */ +- if ((reason == 17 || reason == 18) && +- block[4] == 1 && block[6] == RO_LOAD_CLIPBOARD) +- break; /* Got it - stop waiting. */ +- process_event(reason, block); +- if (ro_return_early) +- return; +- } +- /* Tell owner to save data in . */ +- block[0] = 60; +- block[3] = block[2]; /* Copy myref -> yourref */ +- block[4] = 2; /* DataSaveAck. */ +- block[9] = -1; /* Data is unsafe. */ +- strcpy( ((char_u *) block) + 44, ""); +- swi(Wimp_SendMessage, 17, block, block[1]); +- +- /* Wait again for reply. */ +- for (;;) +- { +- reason = wimp_poll(0, block); +- if (reason == 0) +- return; /* Other program has given up! */ +- if ((reason == 17 || reason == 18) && block[4] == 3 && block[6] == RO_LOAD_CLIPBOARD) +- break; /* Clipboard data saved to */ +- process_event(reason, block); +- if (ro_return_early) +- return; +- } +- +- /* contains clipboard - load it. */ +- if (xswi(OS_File, 17, "") & v_flag) +- return; /* Error! */ +- if (r0 != 1 && r0 != 3) +- return; +- length = r4; +- +- buffer = lalloc(length, TRUE); /* Claim memory (and report errors). */ +- if (buffer == NULL) +- return; +- +- if (xswi(OS_File, 16, "", buffer, 0) & v_flag) +- return; +- +- clip_yank_selection(MCHAR, buffer, length, cbd); +- +- vim_free(buffer); +- +- swi(OS_FSControl, 27, "", 0, 0); /* Delete temp file. */ +- +- block[4] = 4; /* Send DataLoadAck. */ +- block[3] = block[2]; /* Copy myref -> yourref. */ +- swi(Wimp_SendMessage, 17, block, block[1]); +- } +- +- /* Not sure what this means under RISC OS. */ +- void +- clip_mch_lose_selection(VimClipboard *cbd) +- { +- } +- +- /* Tell everyone that we now own the clipboard. +- * Return OK if our claim is accepted (always, under RISC OS) +- */ +- int +- clip_mch_own_selection(VimClipboard *cbd) +- { +- int block[6]; +- block[0] = 24; /* Length of block. */ +- block[3] = 0; /* Original message. */ +- block[4] = 0xf; /* ClaimEntity. */ +- block[5] = 0x4; /* Claim clipboard only. */ +- swi(Wimp_SendMessage, 17, block, 0); +- return OK; +- } +- +- /* +- * Send the current selection to the clipboard. Do nothing for X because we +- * will fill in the selection only when requested by another app. Sounds good +- * for RISC OS too. +- */ +- void +- clip_mch_set_selection(VimClipboard *cbd) +- { +- clip_get_selection(cbd); +- } +- +- /* +- * Make a menu either grey or not grey. +- */ +- void +- gui_mch_menu_grey(vimmenu_T *menu, int grey) +- { +- menu-> greyed_out = grey; +- } +- +- /* +- * Make menu item hidden or not hidden +- */ +- void +- gui_mch_menu_hidden(vimmenu_T *menu, int hidden) +- { +- menu-> hidden = hidden; +- } +- +- /* +- * This is called after setting all the menus to grey/hidden or not. +- */ +- void +- gui_mch_draw_menubar(void) +- { +- swi(Wimp_CreateMenu, 0, -1); +- if (wimp_menu != (int *) -1) +- { +- ro_remove_menu(wimp_menu); +- wimp_menu = (int *) -1; +- } +- } +- +- /* Add or remove a scrollbar. Note that this is only called when +- * the scrollbar state is changing. +- * The scroll bar window has already been created. +- * We can't do anything except remove the scroll bar +- * until we know what size to use. +- */ +- void +- gui_mch_enable_scrollbar(sb, flag) +- scrollbar_T *sb; +- int flag; +- { +- if (!flag) +- swi(Wimp_CloseWindow, 0, & (sb->id) ); +- return; +- } +- +- void +- gui_mch_set_blinking(long waittime, long on, long off) +- { +- } +- +- /* +- * Stop the cursor blinking. Show the cursor if it wasn't shown. +- */ +- void +- gui_mch_stop_blink(void) +- { +- } +- +- /* +- * Start the cursor blinking. If it was already blinking, this restarts the +- * waiting time and shows the cursor. +- */ +- void +- gui_mch_start_blink(void) +- { +- } +- +- /* +- * Return the RGB value of a pixel as a long. +- */ +- long_u +- gui_mch_get_rgb(guicolor_T pixel) +- { +- return (long_u)pixel; +- } +- +- void +- gui_mch_set_text_area_pos(int x, int y, int w, int h) +- { +- } +- +- void +- gui_mch_enable_menu(int flag) +- { +- } +- +- void +- gui_mch_set_menu_pos(int x, int y, int w, int h) +- { +- } +- +- void +- gui_mch_add_menu(vimmenu_T *menu, int idx) +- { +- } +- +- void +- gui_mch_add_menu_item(vimmenu_T *menu, int idx) +- { +- } +- +- void +- gui_mch_new_menu_colors(void) +- { +- } +- +- void +- gui_mch_destroy_menu(vimmenu_T *menu) +- { +- } +- +- /* Size of buffer has changed. +- * Add one to max since gui.c subtracts one more than it should! +- */ +- void +- gui_mch_set_scrollbar_thumb(sb, val, size, max) +- scrollbar_T *sb; +- long val; +- long size; +- long max; +- { +- int block[10], width, height; +- +- width = (max + 1) * gui.char_width; +- height = (max + 1 + W_STATUS_HEIGHT(sb->wp)) * gui.char_height; +- +- block[0] = block[3] = 0; +- block[1] = -height + (1 << y_eigen_factor); +- block[2] = width; +- +- swi(Wimp_SetExtent, sb -> id, block); +- +- block[0] = sb -> id; +- swi(Wimp_GetWindowState, 0, block); +- block[5] = val * gui.char_width; +- block[6] = -val * gui.char_height; +- swi(Wimp_OpenWindow, 0, block, 0x4b534154, +- gui.window_handle, /* Parent window handle. */ +- (CHILD_FIX_TO_RIGHT << CHILD_LEFT ) | +- (CHILD_FIX_TO_RIGHT << CHILD_RIGHT ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_TOP ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_BOTTOM) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_X) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_Y) +- ); +- } +- +- /* Set the position of the scrollbar within the editor +- * window. Note that, for vertical scrollbars, x and w +- * are ignored. For horizontal bars y and h are ignored. +- */ +- void +- gui_mch_set_scrollbar_pos(sb, x, y, w, h) +- scrollbar_T *sb; +- int x; /* Horizontal sb position */ +- int y; /* Top of scroll bar */ +- int w; /* Width */ +- int h; /* Height */ +- { +- int block[24]; +- int px1, py1; /* Parent window min coords */ +- int px2, py2; /* Parent window max coords */ +- +- /* Find where the parent window is. */ +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- px1 = block[1]; +- py1 = block[2]; +- px2 = block[3]; +- py2 = block[4]; +- +- block[0] = sb -> id; +- +- /* Find out how big the scroll window is at the moment. */ +- swi(Wimp_GetWindowInfo, 0, ((char_u *)block) + 1); +- +- if (block[13] < w || block[12] > -h) +- { +- /* Current window is too small! */ +- if (block[12] > -h) +- block[12] = -h; +- if (block[13] < w) +- block[13] = w; +- swi(Wimp_SetExtent, block[0], block + 11); +- } +- +- /* This works better on the nested_wimp. */ +- if (sb-> wp) +- { +- /* This is a vertical scrollbar. */ +- block[1] = block[3] = px2 - gui.scrollbar_width + (1 << x_eigen_factor); +- block[2] = 1 + py2 - (y + h) + (1 << y_eigen_factor); +- block[4] = 1 + py2 - y; +- } +- else +- { +- /* This is a horizontal scrollbar. */ +- block[2] = block[4] = py1 + gui.scrollbar_height; +- block[1] = px1; +- block[3] = px2 - gui.scrollbar_width; +- } +- +- block[5] = 0; +- block[6] = 0; +- block[7] = -1; +- +- swi(Wimp_OpenWindow, 0, block, 0x4b534154, +- gui.window_handle, /* Parent window handle. */ +- (CHILD_FIX_TO_RIGHT << CHILD_LEFT ) | +- (CHILD_FIX_TO_RIGHT << CHILD_RIGHT ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_TOP ) | +- (CHILD_FIX_TO_BOTTOM << CHILD_BOTTOM) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_X) | +- (CHILD_SELF_SCROLL << CHILD_SCROLL_Y) +- ); +- } +- +- /* Create a window with no workarea to place inside editor window. +- * (what happens without the nested wimp?) +- * Data for scrollbar is invalid. +- */ +- void +- gui_mch_create_scrollbar(sb, orient) +- scrollbar_T *sb; +- int orient; /* orient is SBAR_HORIZ or SBAR_VERT */ +- { +- int bar[] = +- { +- 0, 0, /* Visible area : min X,Y */ +- 100, 100, /* max X,Y */ +- 0, 0, /* Scroll offsets */ +- -1, /* Window in front */ +- 0x80800150 | (orient == SBAR_HORIZ ? (1 << 30) : (1 << 28)), +- 0xff070207, /* Colours */ +- 0x000c0103, /* More colours */ +- 0, -0x4000, /* Workarea extent */ +- 0x4000, 0, /* max X,Y */ +- 0x00000000, /* No title */ +- 0 << 12, /* No workarea button type */ +- 1, /* Wimp sprite area */ +- 0x00010001, /* Minimum width, height */ +- 0, 0, 0, /* Title data (none) */ +- 0 /* No icons */ +- }; +- swi(Wimp_CreateWindow, 0, bar); +- sb -> id = r0; +- } +- +- #if defined(FEAT_WINDOWS) || defined(PROTO) +- void +- gui_mch_destroy_scrollbar(scrollbar_T *sb) +- { +- swi(Wimp_DeleteWindow, 0, & (sb->id)); +- sb -> id = -1; +- } +- #endif +- +- void +- gui_mch_set_scrollbar_colors(scrollbar_T *sb) +- { +- /* Always use default RO colour scheme. */ +- } +- +- /* +- * Get current mouse coordinates in text window. +- * Note: (0,0) is the bottom left corner, positive y is UP. +- */ +- void +- gui_mch_getmouse(x, y) +- int *x; +- int *y; +- { +- int left; +- int top; +- int block[10]; +- +- block[0] = gui.window_handle; +- swi(Wimp_GetWindowState, 0, block); +- left = block[1]; +- top = block[4]; +- +- swi(Wimp_GetPointerInfo, 0, block); +- *x = block[0] - left; +- *y = top - block[1]; +- } +- +- /* MouseTo(x, y) */ +- void +- gui_mch_setmouse(x, y) +- int x; +- int y; +- { +- } +- +- void +- gui_mch_toggle_tearoffs(enable) +- int enable; +- { +- /* no tearoff menus */ +- } +- +- /* Redraw a window's title. +- * For the nested wimp we use the new 'redraw-title-bar' reason code. +- * For older wimps we mark the area of the screen where the title bar +- * is as invalid. +- */ +- void +- ro_redraw_title(window) +- int window; +- { +- if (nested_wimp) +- { +- swi(Wimp_ForceRedraw, window, 0x4b534154, 3); +- } +- else +- { +- int block[10]; +- int miny; +- +- block[0] = window; +- swi(Wimp_GetWindowState, 0, block); +- miny = block[4]; +- swi(Wimp_GetWindowOutline, 0, block); +- swi(Wimp_ForceRedraw, -1, +- block[1], miny, +- block[3], block[4]); +- } +- } +- +- /* Turn a vimmenu_T structure into a wimp menu structure. +- * -1 if resulting menu is empty. +- * Only the children and dname items in the root menu are used. +- */ +- int * +- ro_build_menu(menu) +- vimmenu_T *menu; +- { +- int *wimp_menu; +- int width = 4; +- int w; +- int size = 28; +- vimmenu_T *item; +- int *wimp_item; +- +- /* Find out how big the menu is so we can allocate memory for it */ +- for (item = menu-> children; item; item = item-> next) +- { +- if (item-> hidden == FALSE && !menu_is_separator(item->name)) +- size += 24; +- } +- +- if (size <= 28) +- return (int *) -1; /* No children - shouldn't happen */ +- +- wimp_menu = (int *) alloc(size); +- +- wimp_menu[0] = (int) menu-> dname; +- wimp_menu[1] = -1; +- wimp_menu[2] = 0; +- wimp_menu[3] = 0x00070207; +- wimp_menu[5] = 44; +- wimp_menu[6] = 0; +- +- wimp_item = wimp_menu + 7; +- +- for (item = menu-> children; item; item = item-> next) +- { +- if (menu_is_separator(item-> name)) +- { +- /* This menu entry is actually a separator. If it is not the first +- * menu entry then mark the previous menu item as needing a dotted +- * line after it. +- */ +- if (wimp_item > wimp_menu + 7) +- wimp_item[-6] |= 0x2; +- } +- else if (item-> hidden == FALSE) +- { +- wimp_item[0] = 0; +- wimp_item[1] = item-> children ? (int) ro_build_menu(item) : -1; +- wimp_item[2] = 0x07009131 | (item-> greyed_out << 22); +- wimp_item[3] = (int) item-> dname; +- wimp_item[4] = -1; +- wimp_item[5] = (int) item; /* Stuff the menu address in this unused space */ +- +- w = strlen(item-> dname) + 1; +- if (w > width) +- width = w; +- wimp_item += 6; +- } +- } +- +- wimp_menu[4] = (width + 2) * 16; +- wimp_menu[7] |= 0x100; /* Menu title is indirected */ +- wimp_item[-6] |= 0x080; /* Last entry in menu */ +- return wimp_menu; +- } +- +- static void +- ro_remove_menu(menu) +- int *menu; +- { +- int *item = menu + 7; +- +- if (menu == NULL || menu == (int *) -1) +- return; +- +- for (;;) +- { +- if (item[1] != -1) +- ro_remove_menu((int *) item[1]); /* Remove sub-menu */ +- if (item[0] & 0x80) +- break; /* This was the last entry */ +- item += 6; +- } +- vim_free(menu); +- } +- +- void +- gui_mch_show_popupmenu(menu) +- vimmenu_T *menu; +- { +- int block[10]; +- +- /* Remove the existing menu, if any */ +- if (wimp_menu != (int *) -1) +- { +- swi(Wimp_CreateMenu, 0, -1); +- ro_remove_menu(wimp_menu); +- wimp_menu = (int *) -1; +- } +- +- wimp_menu = ro_build_menu(menu); +- if (wimp_menu != (int *) -1) +- { +- swi(Wimp_GetPointerInfo, 0, block); +- swi(Wimp_CreateMenu, 0, wimp_menu, block[0] - 64, block[1] + 64); +- } +- } +- +- /* Run a command using the TaskWindow module. +- * If SHELL_FILTER is set then output is not echoed to the screen, +- * If it is not set, then \r is not sent to the output file. +- */ +- int +- gui_mch_call_shell(cmd, options) +- char_u *cmd; +- int options; /* SHELL_FILTER if called by do_filter() */ +- /* SHELL_COOKED if term needs cooked mode */ +- { +- char_u task_cmd[256]; /* Contains *TaskWindow command. */ +- int block[64]; +- int reason; +- char_u *out; +- char_u c; +- int old_msg_col; +- char_u *out_redir; +- int length; +- FILE *out_file = NULL; +- +- out_redir = strstr(cmd, " > "); +- if (out_redir == NULL) +- length = strlen(cmd); /* No redirection. */ +- else +- { +- length = out_redir - cmd; +- out_file = fopen(out_redir + 3, "wb"); +- if (out_file == NULL) +- smsg("WARNING : Can't open file %s for writing\n", out_redir + 3); +- } +- +- if (length > 180) +- { +- if (out_file) +- fclose(out_file); +- return FAIL; /* Command too long. */ +- } +- +- strcpy(task_cmd, "TaskWindow \""); +- strncpy(task_cmd + 12, cmd, length); +- sprintf(task_cmd + 12 + length, +- "\" -task &%08x -ctrl -quit -name \"Vim command\"", +- task_handle); +- +- if (options & SHELL_COOKED) +- settmode(TMODE_COOK); +- +- if (xswi(Wimp_StartTask, task_cmd) & v_flag) +- { +- /* Failed to even start a new task (out of memory?) */ +- settmode(TMODE_RAW); +- if (out_file) +- fclose(out_file); +- return FAIL; +- } +- +- /* Wait for the child process to initialise. */ +- child_handle = 0; +- while (!child_handle) +- { +- reason = wimp_poll(0, block); +- if ((reason == 17 || reason == 18) && block[4] == 0x808c2) +- child_handle = block[1]; +- else +- process_event(reason, block); +- } +- +- /* Block until finished */ +- while (child_handle) +- { +- reason = wimp_poll(1, block); +- if (reason == 3 || (reason == 8 && block[6] == 3)) +- { +- /* Close window request or CTRL-C - kill child task. */ +- block[0] = 20; +- block[3] = 0; +- block[4] = 0x808c4; /* Morite */ +- swi(Wimp_SendMessage, 17, block, child_handle); +- MSG_PUTS(_("\nSending message to terminate child process.\n")); +- continue; +- } +- else if (reason == 8) +- { +- block[0] = 28; +- block[3] = 0; +- block[4] = 0x808c0; /* Input */ +- block[5] = 1; +- /* Block[6] is OK as it is! */ +- swi(Wimp_SendMessage, 17, block, child_handle); +- continue; +- } +- else if (reason == 17 || reason == 18) +- { +- if (block[4] == 0x808c1) +- { +- /* Ack message. */ +- block[3] = block[2]; +- swi(Wimp_SendMessage, 19, block, block[1]); +- out = (char_u *)block + 24; +- old_msg_col = msg_col; +- while (block[5]--) +- { +- c = *out++; +- if (out_file && (c != '\r' || (options & SHELL_FILTER))) +- fputc(c, out_file); +- if ((options & SHELL_FILTER) == 0) +- { +- if (c == 127) +- msg_puts("\b \b"); +- else if (c > 31) +- msg_putchar(c); +- else if (c == 10) +- { +- lines_left = 8; /* Don't do More prompt! */ +- msg_putchar(10); +- } +- } +- } +- /* Flush output to the screen. */ +- windgoto(msg_row, msg_col); +- out_flush(); +- continue; +- } +- } +- process_event(reason, block); +- } +- msg_putchar('\n'); +- settmode(TMODE_RAW); +- if (out_file) +- fclose(out_file); +- return OK; +- } +- +- /* Like strsave(), but stops at any control char */ +- char_u * +- wimp_strsave(str) +- char *str; +- { +- int strlen = 0; +- char_u *retval; +- while (str[strlen] > 31) +- strlen++; +- retval = alloc(strlen + 1); +- if (retval) +- { +- memcpy(retval, str, strlen); +- retval[strlen] = '\0'; +- } +- return retval; +- } +- +- /* If we are saving then pop up a standard RISC OS save box. +- * Otherwise, open a directory viewer on the given directory (and return NULL) +- * The string we return will be freed later. +- */ +- char_u * +- gui_mch_browse(saving, title, dflt, ext, initdir, filter) +- int saving; /* write action */ +- char_u *title; /* title for the window */ +- char_u *dflt; /* default file name */ +- char_u *ext; /* extension added */ +- char_u *initdir; /* initial directory, NULL for current dir */ +- char_u *filter; /* file name filter */ +- { +- char command[256]; +- int length; +- +- if (saving) +- { +- int block[64]; +- int reason; +- int done_save = FALSE; +- char_u *retval = NULL; +- char_u *sprname; +- char_u *fname; +- int dragging_icon = FALSE; +- int filetype; +- +- if (!dflt) +- dflt = "TextFile"; +- +- block[0] = save_window; +- block[1] = 0; +- swi(Wimp_GetIconState, 0, block); +- sprname = ((char_u *) block[7]); +- block[1] = 1; +- swi(Wimp_GetIconState, 0, block); +- fname = ((char *) block[7]); +- strncpy(fname, dflt, 255); +- +- if (xswi(OS_FSControl, 31, curbuf->b_p_oft) & v_flag) +- { +- filetype = 0xfff; +- strcpy(sprname + 5, "xxx"); +- } +- else +- { +- filetype = r2; +- sprintf(sprname + 5, "%03x", filetype); +- } +- +- /* Open the save box */ +- +- swi(Wimp_GetPointerInfo, 0, block); +- swi(Wimp_CreateMenu, 0, save_window, block[0] - 64, block[1] + 64); +- swi(Wimp_SetCaretPosition, save_window, 1, 0, 0, -1, -1); +- +- while (!done_save) +- { +- reason = wimp_poll(1, block); +- switch (reason) +- { +- case 1: +- redraw_window(block); +- break; +- case 2: +- if (block[0] == save_window) +- swi(Wimp_OpenWindow, 0, block); +- else +- ro_open_window(block); +- break; +- case 3: +- done_save = TRUE; +- break; +- case 6: +- if (block[3] != save_window) +- done_save = TRUE; +- else +- { +- int drag_box[4]; +- int min_x, max_y; +- +- switch (block[4]) +- { +- case 0: /* Start drag */ +- block[0] = save_window; +- swi(Wimp_GetWindowState, 0, block); +- min_x = block[1]; +- max_y = block[4]; +- block[1] = 0; +- swi(Wimp_GetIconState, 0, block); +- drag_box[0] = block[2] + min_x; +- drag_box[1] = block[3] + max_y; +- drag_box[2] = block[4] + min_x; +- drag_box[3] = block[5] + max_y; +- +- swi(DragASprite_Start, +- 0x45, +- 1, +- sprname, +- drag_box); +- dragging_icon = TRUE; +- break; +- case 2: /* OK */ +- retval = wimp_strsave(fname); +- done_save = TRUE; +- break; +- case 3: /* Cancel */ +- done_save = TRUE; +- break; +- } +- } +- break; +- case 7: +- if (dragging_icon) +- { +- int len = 0; +- +- dragging_icon = FALSE; +- swi(Wimp_GetPointerInfo, 0, block); +- block[5] = block[3]; +- block[6] = block[4]; +- block[7] = block[0]; +- block[8] = block[1]; +- block[9] = 0; /* Don't know the size */ +- block[10] = filetype; +- +- while (fname[len] > 31) +- { +- if (fname[len] == '.') +- { +- fname += len + 1; +- len = 0; +- } +- else +- len++; +- } +- if (len > 211) +- len = 211; +- +- memcpy(((char_u *) block) + 44, fname, len); +- ((char_u *)block)[44 + len] = '\0'; +- +- block[0] = (len + 48) & 0xfc; +- block[3] = 0; +- block[4] = 1; /* DataSave */ +- +- swi(Wimp_SendMessage, 17, block, block[5], block[6]); +- } +- else +- ro_drag_finished(block); +- break; +- case 8: +- if (block[6] == 13) +- { +- retval = wimp_strsave(fname); +- done_save = TRUE; +- } +- else if (block[6] == 0x1b) +- done_save = TRUE; +- else +- swi(Wimp_ProcessKey, block[6]); +- break; +- case 17: +- case 18: +- if (block[4] == 2 && block[9] != -1) +- { +- /* DataSaveAck from dragging icon. */ +- retval = wimp_strsave(((char_u *) block) + 44); +- done_save = TRUE; +- } +- else if (block[4] == 0x400c9) +- { +- /* MenusDeleted */ +- done_save = TRUE; +- } +- else +- ro_message(block); +- break; +- } +- } +- block[0] = save_window; +- swi(Wimp_CloseWindow, 0, block); +- swi(Wimp_GetCaretPosition, 0, block); +- if (block[0] == -1) +- swi(Wimp_SetCaretPosition, gui.window_handle, -1, 0, 0, -1, -1); +- +- return retval; +- } +- else if (initdir) +- { +- /* Open a directory viewer */ +- length = strlen(initdir); +- +- if (length > 240) +- return NULL; /* Path too long! */ +- +- length = sprintf(command, "Filer_OpenDir %s", initdir); +- while (command[length - 1] == '.') +- length--; +- command[length] = '\0'; +- swi(OS_CLI, command); +- } +- return NULL; +- } +--- 0 ---- +*** ../vim-7.3.186/src/os_riscos.c 2010-08-15 21:57:27.000000000 +0200 +--- src/os_riscos.c 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,1292 **** +- /* vi:set ts=8 sts=4 sw=4: +- * +- * VIM - Vi IMproved by Bram Moolenaar +- * +- * Do ":help uganda" in Vim to read copying and usage conditions. +- * Do ":help credits" in Vim to see a list of people who contributed. +- * See README.txt for an overview of the Vim source code. +- */ +- +- #include "vim.h" +- +- /* +- * os_riscos.c +- * +- * Thomas Leonard +- */ +- +- const char *__dynamic_da_name = "Vim heap"; /* Enable and name our dynamic area */ +- int ro_line_mode = TRUE; /* For Ex mode we much echo chars to the screen ourselves */ +- int windowed; /* Flag - are we running inside a text window? */ +- int WinLeft, WinTop; /* We might be started inside a text window */ +- int ScrollTop; /* Make cursor movements relative to ScrollTop. */ +- +- int old_escape_state = -1; +- int old_cursor_state = -1; +- +- #define rgb(r,g,b) ((b<<24) + (g<<16) + (r<<8)) +- #define NORMAL_FG 0x00000000 +- #define NORMAL_BG 0xffffffff +- +- /* Convert a DOS colour number to an RGB palette entry. +- * Mappings from X11 rgb/txt file. +- */ +- static int +- map_colour(dos) +- int dos; /* Standard DOS colour number. */ +- { +- switch (dos) +- { +- case 0: return 0; /* Black */ +- case 1: return rgb(0,0,139); /* DarkBlue */ +- case 2: return rgb(0,100,0); /* DarkGreen */ +- case 3: return rgb(0,139,139); /* DarkCyan */ +- case 4: return rgb(139,0,0); /* DarkRed */ +- case 5: return rgb(139,0,139); /* DarkMagenta */ +- case 6: return rgb(165,42,42); /* Brown, DarkYellow */ +- case 7: return rgb(211,211,211); /* LightGray, LightGrey, Gray, Grey */ +- case 8: return rgb(169,169,169); /* DarkGray, DarkGrey */ +- case 9: return rgb(173,216,230); /* Blue, LightBlue */ +- case 10: return rgb(144,238,144); /* Green, LightGreen */ +- case 11: return rgb(224,255,255); /* Cyan, LightCyan */ +- case 12: return rgb(255,0,0); /* Red, LightRed */ +- case 13: return rgb(255,0,255); /* Magenta, LightMagenta */ +- case 14: return rgb(255,255,0); /* Yellow, LightYellow */ +- case 15: return rgb(255,255,255); /* White */ +- } +- return rgb(100,100,100); +- } +- +- static void +- text_fg(fg) +- int fg; /* Foregound colour in the form &BBGGRR00 */ +- { +- xswi(ColourTrans_SetTextColour, fg, 0, 0, 0); +- } +- +- static void +- text_bg(bg) +- int bg; /* Backgound colour in the form &BBGGRR00 */ +- { +- xswi(ColourTrans_SetTextColour, bg, 0, 0, 1 << 7); +- } +- +- #define OUT_NORMAL 0 +- #define OUT_NUMBER 1 /* Reading in a number */ +- +- void +- mch_write(s, len) +- char_u *s; +- int len; +- { +- static int mode = OUT_NORMAL; +- static int x, y; /* For reading numbers in. */ +- +- if (!term_console) +- { +- /* Maybe we are running Vim remotely - don't interpret chars */ +- while (len--) +- { +- char_u c = *s++; +- swi(OS_WriteC, c); +- /* We might need to send a CR too. This shouldn't +- * hurt if we don't need it, should it? +- */ +- if (c == 10) +- swi(OS_WriteI + 13); +- } +- return; +- } +- +- while (len--) +- { +- char_u c = *s++; +- switch (mode) +- { +- case OUT_NUMBER: +- if (c < '0' || c > '9') +- { +- mode = OUT_NORMAL; +- } +- else +- { +- x = (x * 10) + c - '0'; +- continue; +- } +- /* note: no break here! */ +- +- case OUT_NORMAL: +- switch (c) +- { +- case 1: +- /* Number (in decimal) follows. */ +- mode = OUT_NUMBER; +- y = x; +- x = 0; +- break; +- case 2: +- /* Position cursor. */ +- swi(OS_WriteI + 31); +- swi(OS_WriteC, x); +- swi(OS_WriteC, y - ScrollTop); +- break; +- case 3: +- /* Set scroll region. */ +- if (x == Rows -1 && y == 0 && !windowed) +- { +- /* Whole screen - remove text window. +- * This is MUCH faster. +- */ +- swi(OS_WriteI + 26); +- } +- else +- { +- /* Create a text window. */ +- swi(OS_WriteI + 28); +- swi(OS_WriteC, WinLeft); +- swi(OS_WriteC, WinTop + x); +- swi(OS_WriteC, WinLeft + Columns - 1); +- swi(OS_WriteC, WinTop + y); +- } +- ScrollTop = y; +- break; +- case 4: +- /* Normal mode. */ +- text_fg(NORMAL_FG); +- text_bg(NORMAL_BG); +- break; +- case 5: +- /* Reverse mode. */ +- text_fg(NORMAL_BG); +- text_bg(NORMAL_FG); +- break; +- case 10: +- swi(OS_NewLine); +- break; +- case 14: +- /* Cursor invisible. */ +- swi(OS_WriteN, +- "\027\001\000\000\000\000\000\000\000\000", +- 10); +- break; +- case 15: +- /* Cursor visible. */ +- swi(OS_WriteN, +- "\027\001\002\000\000\000\000\000\000\000", +- 10); +- break; +- case 16: +- /* Cursor very visible (flash) */ +- swi(OS_WriteN, +- "\027\001\003\000\000\000\000\000\000\000", +- 10); +- case 17: +- /* Set foreground colour. */ +- text_fg(map_colour(x)); +- break; +- case 18: +- /* Set background colour. */ +- text_bg(map_colour(x)); +- break; +- case 19: +- /* Scroll text down. */ +- swi(OS_WriteN, +- "\027\007\000\002\000\000\000\000\000\000", +- 10); +- break; +- default: +- swi(OS_WriteC, c); +- } +- continue; +- +- default: +- printf("[output error]"); +- mode = OUT_NORMAL; +- } +- } +- } +- +- /* +- * mch_inchar(): low level input funcion. +- * Get a characters from the keyboard. +- * Return the number of characters that are available. +- * If wtime == 0 do not wait for characters. +- * If wtime == n wait n msecs for characters. +- * If wtime == -1 wait forever for characters. +- * +- * TODO: call convert_input() for 'fileencoding' to 'encoding' conversion. +- */ +- int +- mch_inchar(buf, maxlen, wtime, tb_change_cnt) +- char_u *buf; +- int maxlen; +- long wtime; +- int tb_change_cnt; +- { +- int got=0; +- unsigned int start_time = clock(); +- +- if (ro_line_mode) +- { +- /* We're probably in Ex mode - get whole lines at a time. */ +- +- static char_u line_buffer[256]; +- static int remaining_chars = 0; +- static int buf_pos = 0; +- +- /* Do we need to fetch another line? */ +- if (remaining_chars == 0) +- { +- int old_esc_state; +- swi(OS_Byte, 200, 1, 0xfe); +- old_esc_state = r1; +- +- buf_pos = 0; +- if (xswi(OS_ReadLine, line_buffer, 255, 0, 255) & (c_flag | v_flag)) +- { +- got_int = TRUE; /* ESC pressed */ +- r1 = 0; +- } +- line_buffer[r1] = 13; +- remaining_chars = r1 + 1; /* Count CR as part of input */ +- +- swi(OS_Byte, 200, old_esc_state, 0); +- } +- +- /* Can we send the rest of the buffer back in one go? */ +- if (remaining_chars <= maxlen) +- { +- int got = remaining_chars; +- +- memcpy(buf, line_buffer + buf_pos, got); +- remaining_chars = 0; +- return got; +- } +- +- /* Send as much as we can */ +- memcpy(buf, line_buffer + buf_pos, maxlen); +- buf_pos += maxlen; +- remaining_chars -= maxlen; +- +- return maxlen; +- } +- +- if (!term_console) +- { +- /* Use OS_ReadC for all input. +- * Avoids problems with remote access getting interference from +- * the keyboard. +- */ +- if (wtime == 0) +- return 0; /* Ignore quick key checks */ +- +- if (xswi(OS_ReadC) & c_flag) +- { +- got_int = TRUE; /* ESC pressed - can this happen? */ +- swi(OS_Byte, 124); /* Clear Escape state */ +- r0 = 0x1b; /* It *might* not have been Escape! */ +- } +- buf[0] = r0; +- return 1; +- } +- +- /* +- * OK, here's the plan: +- * +- * 1) Wait until wtime expires or we get a key +- * 2) Get keys until the keyboard buffer is empty or buf is full +- */ +- +- while (xswi(OS_Byte,145,0) & c_flag) +- { +- /* Nothing at all in the keyboard buffer. +- * Has our time expired yet? +- */ +- if ( (wtime != -1) && (clock() - start_time) >= wtime ) +- return 0; /* Nothing read - giving up */ +- } +- +- /* We've got one char (in r2) - are there any more? */ +- +- while (got < maxlen) +- { +- buf[got++] = r2; +- +- if (xswi(OS_Byte,145,0) & c_flag) +- return got; /* Keyboard buffer empty */ +- } +- return got; /* buf is full */ +- } +- +- /* +- * return non-zero if a character is available +- */ +- int +- mch_char_avail() +- { +- if (!term_console) +- return 0; /* Can't tell */ +- if (xswi(OS_Byte, 152, 0) & c_flag) +- return 0; +- return 1; +- } +- +- /* Find out how much free memory we have. +- * I don't know how to work this out exactly but, since we can claim +- * more memory from the OS, let's just report the free pool size. +- * Dynamic area 6 doesn't exist pre 3.6 according to StrongHelp, so +- * we'll use Wimp_SlotSize. If that fails (outside the desktop?) +- * then just return a big number and hope. +- */ +- long_u +- mch_avail_mem(special) +- int special; +- { +- if (xswi(Wimp_SlotSize, -1, -1) & v_flag) +- return 0x7fffffff; +- return r2; +- } +- +- void +- mch_delay(msec, ignoreinput) +- long msec; +- int ignoreinput; +- { +- int start_time, time_now; +- int csec = msec / 10; +- +- swi(OS_ReadMonotonicTime); +- start_time = r0; +- +- for (;;) +- { +- swi(OS_ReadMonotonicTime); +- time_now = r0; +- if (time_now - start_time > csec) +- return; +- #ifdef FEAT_GUI +- /* In the GUI, allow other programs to run while waiting. */ +- if (gui.in_use) +- gui_mch_wait_for_chars(start_time + csec); +- #endif +- } +- } +- +- /* +- * If the machine has job control, use it to suspend the program, +- * otherwise fake it by starting a new shell. +- */ +- void +- mch_suspend() +- { +- suspend_shell(); +- } +- +- void +- mch_init() +- { +- /* +- * Read window size first. Calls to mch_get_shellsize() will +- * simply return these values in future so that setting the +- * text window (used for scrolling) won't give strange results. +- */ +- +- int buf[7] = {132, 135, 256, 257, 1, 2, -1}; +- +- /* Command windows are no longer forced open, since if we are +- * in the desktop then we'll use the GUI version. +- * Opening a command window here messes up the GUI version startup +- */ +- #ifndef FEAT_GUI +- swi(OS_WriteI); +- #endif +- swi(OS_ReadVduVariables, buf, buf); +- WinLeft = buf[0]; +- WinTop = buf[1]; +- Columns = buf[2]; +- Rows = buf[3] + 1; /* Seems to be one off (VduVars wrong?) */ +- ScrollTop = 0; +- +- /* Are we running in a textwindow? */ +- if (Rows == buf[5] + 1 && Columns == buf[4] + 1) +- windowed = 0; +- else +- windowed = 1; +- +- /* Choose a nice colour scheme. */ +- text_fg(NORMAL_FG); +- text_bg(NORMAL_BG); +- } +- +- /* +- * Check_win checks whether we have an interactive stdout. +- */ +- /* ARGSUSED */ +- int +- mch_check_win(argc, argv) +- int argc; +- char **argv; +- { +- return OK; +- } +- +- /* +- * Return TRUE if the input comes from a terminal, FALSE otherwise. +- */ +- int +- mch_input_isatty() +- { +- if (xswi(OS_ChangeRedirection, -1, -1) & v_flag) +- return TRUE; /* Error - TRUE is probably correct though */ +- if (r0 == 0) +- return TRUE; +- return FALSE; +- } +- +- #ifdef FEAT_TITLE +- int +- mch_can_restore_title() +- { +- return FALSE; +- } +- +- int +- mch_can_restore_icon() +- { +- return FALSE; +- } +- +- +- /* +- * Set the window title and icon. +- */ +- void +- mch_settitle(title, icon) +- char_u *title; +- char_u *icon; +- { +- if (title == NULL) +- title = (char_u *) ""; +- #ifdef FEAT_GUI +- if (gui.in_use && strcmp(title, gui.window_title)) +- { +- int length; +- length = strlen(title); +- if (length >= gui.window_title_size) +- length = gui.window_title_size - 1; +- strncpy(gui.window_title, title, length); +- gui.window_title[length] = 0; +- ro_redraw_title(gui.window_handle); +- } +- #endif +- return; +- } +- +- /* +- * Restore the window/icon title. +- * "which" is one of: +- * 1 only restore title +- * 2 only restore icon +- * 3 restore title and icon +- */ +- void +- mch_restore_title(which) +- int which; +- { +- return; +- } +- #endif +- +- /* +- * Insert user name in s[len]. +- * Return OK if a name found. +- */ +- int +- mch_get_user_name(s, len) +- char_u *s; +- int len; +- { +- /* RISC OS doesn't support user names. */ +- *s = NUL; +- return FAIL; +- } +- +- /* +- * Insert host name in s[len]. +- */ +- +- void +- mch_get_host_name(s, len) +- char_u *s; +- int len; +- { +- if (xswi(OS_ReadVarVal, "Machine$Name", s, len, 0, 3) & v_flag) +- { +- /* Variable does not exist (normal operation) */ +- vim_strncpy(s, "(unknown)", len - 1); +- } +- } +- +- /* +- * return process ID +- */ +- long +- mch_get_pid() +- { +- if (xswi(Wimp_ReadSysInfo, 5) & v_flag) +- return 0; +- return r0; +- } +- +- /* +- * Get name of current directory into buffer 'buf' of length 'len' bytes. +- * Return OK for success, FAIL for failure. +- */ +- int +- mch_dirname(buf, len) +- char_u *buf; +- int len; +- { +- if (xswi(OS_FSControl, 37, "@", buf, 0, 0, len) & v_flag) +- return FAIL; +- return OK; +- } +- +- /* +- * Get absolute file name into buffer 'buf' of length 'len' bytes. +- * +- * return FAIL for failure, OK for success +- */ +- int +- mch_FullName(fname, buf, len, force) +- char_u *fname, *buf; +- int len; +- int force; /* Also expand when already absolute path name. +- * Not used under RISC OS. +- */ +- { +- if (xswi(OS_FSControl, 37, fname, buf, 0, 0, len) & v_flag) +- return FAIL; +- return OK; +- } +- +- /* +- * Return TRUE if "fname" does not depend on the current directory. +- */ +- int +- mch_isFullName(fname) +- char_u *fname; +- { +- if (strstr(fname, "::") && strstr(fname,".$.")) +- return TRUE; +- return FALSE; +- } +- +- /* +- * Get file permissions for 'name'. +- * Returns -1 when it doesn't exist. +- */ +- long +- mch_getperm(name) +- char_u *name; +- { +- struct stat statb; +- +- if (stat((char *)name, &statb)) +- return -1; +- return statb.st_mode; +- } +- +- /* +- * set file permission for 'name' to 'perm' +- * +- * return FAIL for failure, OK otherwise +- */ +- int +- mch_setperm(name, perm) +- char_u *name; +- long perm; +- { +- return (chmod((char *)name, (mode_t)perm) == 0 ? OK : FAIL); +- } +- +- /* +- * Set hidden flag for "name". +- */ +- /* ARGSUSED */ +- void +- mch_hide(name) +- char_u *name; +- { +- /* can't hide a file */ +- } +- +- /* +- * return TRUE if "name" is a directory +- * return FALSE if "name" is not a directory +- * return FALSE for error +- */ +- int +- mch_isdir(name) +- char_u *name; +- { +- if (xswi(OS_File, 17, name) & v_flag) +- return FALSE; +- if (r0 == 2 || r0 == 3) +- return TRUE; /* Count image files as directories. */ +- return FALSE; +- } +- +- /* +- * Return 1 if "name" can be executed, 0 if not. +- * Return -1 if unknown. Requires which to work. +- */ +- int +- mch_can_exe(name) +- char_u *name; +- { +- char_u *buf; +- char_u *p; +- int retval; +- +- buf = alloc((unsigned)STRLEN(name) + 7); +- if (buf == NULL) +- return -1; +- sprintf((char *)buf, "which %s", name); +- p = get_cmd_output(buf, NULL, SHELL_SILENT); +- vim_free(buf); +- if (p == NULL) +- return -1; +- /* result can be: "name: Command not found" */ +- retval = (*p != NUL && strstr((char *)p, "not found") == NULL); +- vim_free(p); +- return retval; +- } +- +- /* +- * Check what "name" is: +- * NODE_NORMAL: file or directory (or doesn't exist) +- * NODE_WRITABLE: writable device, socket, fifo, etc. +- * NODE_OTHER: non-writable things +- */ +- int +- mch_nodetype(name) +- char_u *name; +- { +- /* TODO */ +- return NODE_NORMAL; +- } +- +- void +- mch_early_init() +- { +- /* Turn off all the horrible filename munging in UnixLib. */ +- int __riscosify_control = __RISCOSIFY_NO_PROCESS; +- } +- +- void +- mch_exit(r) +- int r; +- { +- settmode(TMODE_COOK); +- exiting = TRUE; +- out_flush(); +- ml_close_all(TRUE); /* remove all memfiles */ +- +- #ifdef FEAT_GUI +- if (gui.in_use) +- gui_exit(r); +- #endif +- swi(OS_NewLine); +- if (old_escape_state != -1) +- swi(OS_Byte, 229, old_escape_state, 0); +- if (old_cursor_state != -1) +- swi(OS_Byte, 4, old_cursor_state); +- exit(r); +- } +- +- void +- mch_settmode(tmode) +- int tmode; /* TMODE_RAW or TMODE_COOK */ +- { +- if (tmode == TMODE_COOK) +- { +- ro_line_mode = TRUE; +- return; +- } +- +- ro_line_mode = FALSE; +- +- if (term_console) +- { +- /* Block cursor. */ +- swi(OS_WriteN, +- "\027\000\012\000\000\000\000\000\000\000", +- 10); +- +- /* Disable the standard cursor key actions. */ +- swi(OS_Byte, 4, 1); +- if (old_cursor_state == -1) +- old_cursor_state = r1; +- } +- +- /* Stop Escape from quitting Vim! */ +- swi(OS_Byte, 229, 1, 0); +- if (old_escape_state == -1) +- old_escape_state = r1; +- } +- +- /* +- * set mouse clicks on or off (only works for xterms) +- */ +- void +- mch_setmouse(on) +- int on; +- { +- } +- +- /* +- * set screen mode, always fails. +- */ +- /* ARGSUSED */ +- int +- mch_screenmode(arg) +- char_u *arg; +- { +- EMSG(_(e_screenmode)); +- return FAIL; +- } +- +- /* +- * Try to get the current window size. +- * Return OK when size could be determined, FAIL otherwise. +- * Simply return results stored by mch_init() if we are the +- * machine's console. If not, we don't know how big the screen is. +- */ +- int +- mch_get_shellsize() +- { +- /* if size changed: screenalloc will allocate new screen buffers */ +- return term_console ? OK : FAIL; +- } +- +- /* +- * Can't change the size. +- * Assume the user knows what he's doing and use the new values. +- */ +- void +- mch_set_shellsize() +- { +- /* Assume the user knows what he's doing and use the new values. */ +- } +- +- /* +- * Rows and/or Columns has changed. +- */ +- void +- mch_new_shellsize() +- { +- /* Nothing to do. */ +- } +- +- int +- mch_call_shell(cmd, options) +- char_u *cmd; +- int options; /* SHELL_*, see vim.h */ +- { +- int retval; +- int tmode = cur_tmode; +- +- if (cmd == NULL) +- cmd = (char_u *) "GOS"; +- +- #ifdef FEAT_GUI +- if (gui.in_use) +- return gui_mch_call_shell(cmd, options); +- #endif +- if (options & SHELL_COOKED) +- settmode(TMODE_COOK); /* set to normal mode */ +- MSG_PUTS("\n"); +- +- /* I don't even want to think about what UnixLib must +- * be doing to allow this to work... +- */ +- retval = system(cmd); +- if (retval && !(options & SHELL_SILENT)) +- EMSG(strerror(EOPSYS)); /* Doesn't seem to set errno? */ +- +- swi(OS_Byte, 229, 1, 0); /* Re-disable escape */ +- if (tmode == TMODE_RAW) +- settmode(TMODE_RAW); /* set to raw mode */ +- return retval ? FAIL : OK; +- } +- +- /* +- * Check for Escape being pressed right now. +- * [ different if !term_console? ] +- */ +- void +- mch_breakcheck() +- { +- if (xswi(OS_Byte, 121, 0xf0) & v_flag) +- return; +- if (r1 == 0xff) +- { +- got_int = TRUE; +- swi(OS_Byte, 15, 1); /* Flush input buffer */ +- } +- } +- +- /* +- * Recursively expand one path component into all matching files and/or +- * directories. +- * "path" has backslashes before chars that are not to be expanded. +- * Return the number of matches found. +- */ +- int +- mch_expandpath(gap, path, flags) +- garray_T *gap; /* Grow array for results. */ +- char_u *path; +- int flags; /* EW_* flags */ +- { +- int got; /* Number of matches. */ +- char_u *pattern; +- +- /* Plan: +- * +- * 1) Get first part of path - no wildcards +- * 2) Get next path element (wildcarded) +- * 3) Get rest of path +- * +- * If (3) is nothing then only the leaf is wildcarded - add to gap +- * Otherwise call recursively for each path in (2), passing (3) +- * +- * This is just the header function. +- */ +- +- /* We must be able to modifiy path, so make a copy */ +- pattern = vim_strsave(path); +- if (pattern == NULL) +- return 0; +- got = expand_section(gap, (char_u *)"", pattern, flags); +- vim_free(pattern); +- return got; +- } +- +- /* +- * expand_section(gap, "$.Dir1.Dir2", "ABBA*.myleaf##") +- * +- * calls expand_section(gap, "$.Dir1.Dir2.ABBA_Gold", "myleaf##") +- * and expand_section(gap, "$.Dir1.Dir2.ABBA_Live", "myleaf##") +- * +- * If rest is just a leaf then all matches are added to gap. +- * +- * Returns number of items added to gap. +- */ +- int +- expand_section(gap, root, rest, flags) +- garray_T *gap; +- char_u *root; /* Non-wildcarded path to search */ +- char_u *rest; /* Wildcarded remainder of path */ +- int flags; /* Add dirs/files/missing objects. */ +- { +- static char_u buf[MAXPATHL]; /* Temporary buffer. */ +- char_u dir[MAXPATHL]; +- int start_element = -1; /* Start of wildcarded element */ +- char_u c; +- int i; +- int got, dir_pos; +- int buflen; /* Chars used in buf[] */ +- int colon = 0; /* Dir ends in ':' */ +- +- buflen = strlen(root); +- STRNCPY(buf, root, buflen); /* Copy root into buffer. */ +- +- /* +- * Find end of nonwildcarded section. +- * Count ':' as a path sep since Vim:Bug* is a valid pathname. +- */ +- +- for (i = 0; c = rest[i]; i++) +- { +- if (c == PATHSEP) +- { +- start_element = i; +- colon = 0; +- } +- if (c == ':') +- { +- start_element = i + 1; +- colon = 1; +- } +- if (c == '#' || c == '*') +- break; +- } +- if (c == 0) +- start_element = i; +- +- /* +- * start_element +> terminator for non-wildcarded section. +- * Transfer this bit into buf. +- */ +- if (buflen + start_element + 4 >= MAXPATHL) +- return 0; /* Buffer full */ +- if (start_element >= 0) +- { +- if (*root && !colon) +- buf[buflen++] = PATHSEP; +- strncpy(buf + buflen, rest, start_element); +- buflen += start_element; +- } +- buf[buflen] = 0; +- +- /* +- * Did we reach the end of the string without hitting any wildcards? +- */ +- if (c == 0) +- { +- /* Yes - add combined path to grow array and return. */ +- addfile(gap, buf, flags); +- return 1; +- } +- +- if (start_element < 0 || !colon) +- start_element++; +- rest += start_element; +- +- /* +- * rest does contain wildcards if we get here. +- * +- * Now : have we reached the leaf names part yet? +- * If so, add all matches (files and dirs) to gap. +- * If not, get next path element and scan all matching directories. +- */ +- +- start_element = -1; +- for (i = 0; rest[i]; i++) +- { +- if (rest[i] == '.') +- { +- start_element = i; +- rest[i] = 0; /* Break string here. */ +- break; +- } +- } +- +- /* If start_element is -1 then we are matching leaf names */ +- +- r3 = 0; /* Number of objs read. */ +- dir_pos = 0; /* Position through directory. */ +- got = 0; /* Files added so far. */ +- while (dir_pos != -1) +- { +- buf[buflen] = 0; +- if (xswi(OS_GBPB, 9, +- buf, /* Directory to scan. */ +- buf + buflen + (1 - colon), /* Buffer for result. */ +- 1, /* Number of objects to read. */ +- dir_pos, /* Search position. */ +- MAXPATHL - 2 - buflen, /* Size of result buffer. */ +- rest) /* Wildcarded leafname. */ +- & v_flag) +- { +- EMSG(r0 + 4); +- r4 = -1; +- } +- dir_pos = r4; /* r4 corrupted by addfile() */ +- if (r3 > 0) +- { +- char_u *path = buf; +- if (buflen == 0) +- path++; /* Don't do '.File' */ +- else if (!colon) +- buf[buflen] = '.'; /* Join path and leaf */ +- +- /* Path -> full path of object found */ +- if (start_element == -1) +- { +- addfile(gap, path, flags); +- got++; +- } +- else +- { +- /* Scan into subdirectories and images; ignore files */ +- swi(OS_File, 17, path); +- if (r0 == 2 || r0 == 3) +- got += expand_section(gap, +- path, +- rest + start_element + 1, +- flags); +- } +- } +- } +- +- /* Restore the dot if we removed it. */ +- if (start_element >= 0) +- rest[start_element] = '.'; +- return got; +- } +- +- /* +- * mch_expand_wildcards() - this code does wild-card pattern matching using +- * the shell. It isn't used under RISC OS. +- * +- * return OK for success, FAIL for error (you may lose some memory) and put +- * an error message in *file. +- * +- * num_pat is number of input patterns +- * pat is array of pointers to input patterns +- * num_file is pointer to number of matched file names +- * file is pointer to array of pointers to matched file names +- */ +- int +- mch_expand_wildcards(num_pat, pat, num_file, file, flags) +- int num_pat; +- char_u **pat; +- int *num_file; +- char_u ***file; +- int flags; /* EW_* flags */ +- { +- /* This doesn't get called unless SPECIAL_WILDCHAR is defined. */ +- return FAIL; +- } +- +- /* +- * Return TRUE if "p" contains wildcards which can be expanded by +- * mch_expandpath(). +- */ +- int +- mch_has_exp_wildcard(p) +- char_u *p; +- { +- if (vim_strpbrk((char_u *)"*#", p)) +- return TRUE; +- return FALSE; +- } +- +- /* Return TRUE if "p" contains wildcards. */ +- int +- mch_has_wildcard(p) +- char_u *p; +- { +- if (vim_strpbrk((char_u *)"*#`", p)) +- return TRUE; +- return FALSE; +- } +- +- int /* see Unix unlink(2) */ +- mch_remove(file) +- char_u *file; /* Name of file to delete. */ +- { +- if (xswi(OS_FSControl, 27, file, 0, 0) & v_flag) +- return EXIT_FAILURE; +- return EXIT_SUCCESS; +- } +- +- /* Try to make existing scripts work without modification. +- * Return a pointer to the new string (freed by caller), or NULL +- * +- * Two main cases: +- * - Absolute : $VIM/syntax/help.vim +- * - Relative : Adfs::4.$.!Vim.Resources.Syntax/help.vim +- */ +- char_u * +- mch_munge_fname(fname) +- char_u *fname; +- { +- char_u c; +- int len; +- char_u *retval; +- +- retval = fname = vim_strsave(fname); +- if (fname == NULL) +- return NULL; +- +- if (strncmp(fname, "$VIM/", 5) == 0) +- { +- strncpy(fname, "Vim:", 4); +- for (fname += 5; c = *fname; fname++) +- { +- if (c == '.') +- break; +- if (c == '/') +- fname[-1] = '.'; +- else +- fname[-1] = c; +- } +- fname[-1] = '\0'; +- } +- else +- { +- /* Check to see if the file exists without modification. */ +- if (xswi(OS_File, 17, fname) & v_flag) +- r0 == 0; /* Invalid filename? */ +- if (r0) +- return retval; +- +- len = strlen(fname); +- if (strcmp(fname + len - 4, ".vim") == 0) +- { +- fname[len - 4] = '\0'; +- for (; c = *fname; fname++) +- { +- if (c == '/') +- *fname = '.'; +- } +- } +- } +- return retval; +- } +- +- /* QuickFix reads munged names from the error file. +- * Correct them. +- */ +- int +- ro_buflist_add(old_name) +- char_u *old_name; /* Name of file found by quickfix */ +- { +- char_u *fname; +- char_u *leaf; /* Pointer to start of leaf in old_name */ +- char_u *ptr; +- char_u c; +- int retval; +- +- if (old_name == NULL) +- return buflist_add(NULL, 0); +- +- /* Copy the name so we can mess around with it. */ +- fname = vim_strsave(old_name); +- if (fname == NULL) +- /* Out of memory - can't modify name */ +- return buflist_add(old_name, 0); +- +- /* Change `dir/main.c' into `dir.c.main' */ +- leaf = fname; +- for (ptr = fname; c = *ptr; ptr++) +- { +- if (c == '/') +- { +- leaf = ptr + 1; +- *ptr = '.'; +- } +- else if (c == '.') +- break; +- } +- if (c == '.') +- { +- /* Change `main.c' into `c.main' +- * | | +- * leaf ptr +- */ +- ptr += old_name - fname; +- *ptr = '\0'; +- sprintf(leaf, +- "%s.%s", +- ptr + 1, +- leaf - fname + old_name); +- } +- +- retval = buflist_add(fname, 0); +- free(fname); +- return retval; +- } +- +- /* Change the current directory. +- * Strip trailing dots to make it easier to use with filename completion. +- * Return 0 for success, -1 for failure. +- */ +- int +- mch_chdir(dir) +- char_u *dir; +- { +- int length; +- int retval; +- char_u *new_dir; +- +- if (p_verbose >= 5) +- { +- verbose_enter(); +- smsg((char_u *)"chdir(%s)", dir); +- verbose_leave(); +- } +- length = strlen(dir); +- if (dir[length - 1] != '.') +- return chdir(dir); /* No trailing dots - nothing to do. */ +- new_dir = vim_strsave(dir); +- if (new_dir == NULL) +- return chdir(dir); /* Can't allocate memory. */ +- +- while (new_dir[--length] == '.') +- new_dir[length] = '\0'; +- +- retval = chdir(new_dir); +- vim_free(new_dir); +- return retval; +- } +- +- /* Examine the named file, and set the 'osfiletype' option +- * (in curbuf) to the file's type. +- */ +- void +- mch_read_filetype(file) +- char_u *file; +- { +- int type; +- char_u type_string[9]; +- int i; +- +- if (xswi(OS_File, 23, file) & v_flag) +- type = 0xfff; /* Default to Text */ +- else +- type = r6; +- +- /* Type is the numerical value - see if we have a textual equivalent */ +- swi(OS_FSControl, 18, 0, type); +- ((int *) type_string)[0] = r2; +- ((int *) type_string)[1] = r3; +- type_string[8] = 0; +- for (i = 0; type_string[i] > ' '; i++) +- ; +- type_string[i] = 0; +- +- set_string_option_direct("osfiletype", -1, type_string, OPT_FREE, 0); +- return; +- } +- +- void +- mch_set_filetype(file, type) +- char_u *file; +- char_u *type; +- { +- if (xswi(OS_FSControl, 31, type) & v_flag) +- { +- EMSG(_("E366: Invalid 'osfiletype' option - using Text")); +- r2 = 0xfff; +- } +- +- swi(OS_File, 18, file, r2); +- } +- +- /* Return TRUE if the file's type matches 'type' +- * RISC OS types always start with '&' +- */ +- int +- mch_check_filetype(fname, type) +- char_u *fname; +- char_u *type; +- { +- int value; +- char *end; +- +- if (*type != '&') +- return FALSE; +- +- value = strtol(type + 1, &end, 16); +- if (*end) +- return FALSE; /* Invalid type (report error?) */ +- +- if (xswi(OS_File, 23, fname) & v_flag) +- return FALSE; /* Invalid filename? */ +- +- return (r0 && r6 == value); +- } +--- 0 ---- +*** ../vim-7.3.186/runtime/doc/os_risc.txt 2010-08-15 21:57:16.000000000 +0200 +--- runtime/doc/os_risc.txt 2011-05-10 16:19:25.000000000 +0200 +*************** +*** 1,322 **** +! *os_risc.txt* For Vim version 7.3. Last change: 2010 Aug 07 + + + VIM REFERENCE MANUAL by Thomas Leonard + + + *riscos* *RISCOS* *RISC-OS* +! This file contains the particularities for the RISC OS version of Vim. + +- The RISC OS port is a completely new port and is not based on the old "archi" +- port. + +- 1. File locations |riscos-locations| +- 2. Filename munging |riscos-munging| +- 3. Command-line use |riscos-commandline| +- 4. Desktop (GUI) use |riscos-gui| +- 5. Remote use (telnet) |riscos-remote| +- 6. Temporary files |riscos-temp-files| +- 7. Interrupting |riscos-interrupt| +- 8. Memory usage |riscos-memory| +- 9. Filetypes |riscos-filetypes| +- 10. The shell |riscos-shell| +- 11. Porting new releases |riscos-porting| +- +- If I've missed anything, email me and I'll try to fix it. In fact, even if I +- haven't missed anything then email me anyway to give me some confidence that it +- actually works! +- +- Thomas Leonard +- +- [these URLs no longer work...] +- Port homepage: http://www.ecs.soton.ac.uk/~tal197/ +- or try: http://www.soton.ac.uk/~tal197/ +- +- ============================================================================== +- *riscos-locations* +- 1. File locations +- +- The Vim executable and shared resource files are all stored inside the !Vim +- application directory. +- +- When !Vim is first seen by the filer, it aliases the *vi and *ex commands to +- run the command-line versions of Vim (see |riscos-commandline|). +- +- !Vim.Resources and !Vim.Resources2 contain the files from the standard Vim +- distribution, but modified slightly to work within the limits of ADFS, plus +- some extra files such as the window templates. +- +- User choices are read from "Choices:*" and are saved to ".*". +- If you have the new !Boot structure then these should be set up already. If +- not, set Choices$Path to a list of directories to search when looking for +- user configuration files. Set Choices$Write to the directory you want files +- to be saved into (so your search patterns and marks can be remembered between +- sessions). +- +- ============================================================================== +- *riscos-munging* +- 2. Filename munging +- +- All pathname munging is disabled by default, so Vim should behave like a +- normal RISC OS application now. So, if you want to edit "doc/html" then you +- actually type "*vi doc/html". +- +- The only times munging is done is when: +- +- - Searching included files from C programs, since these are always munged. +- See |[I|. +- Note: make sure you are in the right directory when you use this +- command (i.e. the one with subdirectories "c" and "h"). +- +- - Sourcing files using |:so|. +- Paths starting "$VIM/" are munged like this: +- +- $VIM/syntax/help.vim -> Vim:syntax.help +- +- Also, files ending in ".vim" have their extensions removed, and slashes +- replaced with dots. +- +- Some tag files and script files may have to be edited to work under this port. +- +- ============================================================================== +- *riscos-commandline* +- 3. Command-line use +- +- To use Vim from the command-line use the "*vi" command (or "*ex" for +- |Ex-mode|). +- +- Type "*vi -h" for a list of options. +- +- Running the command-line version of Vim in a large high-color mode may cause +- the scrolling to be very slow. Either change to a mode with fewer colors or +- use the GUI version. +- +- Also, holding down Ctrl will slow it down even more, and Ctrl-Shift will +- freeze it, as usual for text programs. +- +- ============================================================================== +- *riscos-gui* +- 4. Desktop use +- +- Limitations: +- +- - Left scrollbars don't work properly (right and bottom are fine). +- - Doesn't increase scroll speed if it gets behind. +- +- You can resize the window by dragging the lower-right corner, even though +- there is no icon shown there. +- +- You can use the --rows and --columns arguments to specify the initial size of +- the Vim window, like this: > +- +- *Vi -g --rows 20 --columns 80 +- +- The global clipboard is supported, so you can select some text and then +- paste it directly into another application (provided it supports the +- clipboard too). +- +- Clicking Menu now opens a menu like a normal RISC OS program. Hold down Shift +- when clicking Menu to paste (from the global clipboard). +- +- Dragging a file to the window replaces the CURRENT buffer (the one with the +- cursor, NOT the one you dragged to) with the file. +- +- Dragging with Ctrl held down causes a new Vim window to be opened for the +- file (see |:sp|). +- +- Dragging a file in with Shift held down in insert mode inserts the pathname of +- the file. +- +- :browse :w opens a standard RISC OS save box. +- :browse :e opens a directory viewer. +- +- For fonts, you have the choice of the system font, an outline font, the system +- font via ZapRedraw and any of the Zap fonts via ZapRedraw: > +- +- :set guifont= +- < To use the system font via the VDU drivers. Supports +- bold and underline. +- > +- :set guifont=Corpus.Medium +- < Use the named outline font. You can use any font, but +- only monospaced ones like Corpus look right. +- > +- :set guifont=Corpus.Medium:w8:h12:b:i +- < As before, but with size of 8 point by 12 point, and +- in bold italic. +- If only one of width and height is given then that +- value is used for both. If neither is given then 10 +- point is used. +- +- Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name +- with "!" (or "!!" for double height), like this: > +- +- :set guifont=!! +- < Use the system font, but via ZapRedraw. This gives a +- faster redraw on StrongARM processors, but you can't +- get bold or italic text. Double height. +- > +- :set guifont=!script +- < Uses the named Zap font (a directory in VimFont$Path). +- The redraw is the same speed as for "!!", but you get +- a nicer looking font. +- Only the "man+" and "script" fonts are supplied +- currently, but you can use any of the Zap fonts if +- they are in VimFont$Path. +- Vim will try to load font files "0", "B", "I" and "IB" +- from the named directory. Only "0" (normal style) MUST +- be present. Link files are not currently supported. +- +- Note that when using ZapRedraw the edit bar is drawn in front of the character +- you are on rather than behind it. Also redraw is incorrect for screen modes +- with eigen values of 0. If the font includes control characters then you can +- get Vim to display them by changing the 'isprint' option. +- +- If you find the scrolling is too slow on your machine, try experimenting +- with the 'scrolljump' and 'ttyscroll' options. +- +- In particular, StrongARM users may find that: > +- +- :set ttyscroll=0 +- +- makes scrolling faster in high-color modes. +- +- ============================================================================= +- *riscos-remote* +- 5. Remote use (telnet) +- +- I have included a built-in termcap entry, but you can edit the termcap file to +- allow other codes to be used if you want to use Vim from a remote terminal. +- +- Although I do not have an internet connection to my Acorn, I have managed to +- run Vim in a FreeTerm window using the loopback connection. +- +- It seems to work pretty well now, using "*vi -T ansi". +- +- ============================================================================== +- *riscos-temp-files* +- 6. Temporary files +- +- If Vim crashes then the swap and backup files (if any) will be in the +- directories set with the 'directory' and 'bdir' options. By default the swap +- files are in (i.e. inside !Scrap) and backups are in the +- directory you were saving to. Vim will allow you to try and recover the file +- when you next try to edit it. +- +- To see a list of swap files, press and type "*vi -r". +- +- Vim no longer brings up ATTENTION warnings if you try to edit two files with +- the same name in different directories. +- +- However, it also no longer warns if you try to edit the same file twice (with +- two copies of Vim), though you will still be warned when you save that the +- datestamp has changed. +- +- ============================================================================== +- *riscos-interrupt* +- 7. Interrupting +- +- To break out of a looping macro, or similar, hold down Escape in the +- command-line version, or press CTRL-C in the GUI version. +- +- ============================================================================== +- *riscos-memory* +- 8. Memory usage +- +- Vim will use dynamic areas on RISC OS 3.5 or later. If you can use them on +- older machines then edit the !RunTxt and GVim files. I don't know what UnixLib +- does by default on these machines so I'm playing safe. +- +- It doesn't work at all well without dynamic areas, since it can't change its +- memory allocation once running. Hence you should edit "!Vim.GVim" and +- "!Vim.!RunTxt" to choose the best size for you. You probably need at least +- about 1400K. +- +- ============================================================================== +- *riscos-filetypes* +- 9. Filetypes +- +- You can now specify that autocommands are only executed for files of certain +- types. The filetype is given in the form &xxx, when xxx is the filetype. +- +- Filetypes must be specified by number (e.g. &fff for Text). +- +- The system has changed from version 5.3. The new sequence of events is: +- +- - A file is loaded. |'osfiletype'| is set to the RISC OS filetype. +- - Based on the filetype and pathname, Vim will try to set |'filetype'| to the +- Vim-type of the file. +- - Setting this option may load syntax files and perform other actions. +- - Saving the file will give it a filetype of |'osfiletype'|. +- +- Some examples may make this clearer: +- +- Kind of file loaded osfiletype filetype ~ +- C code "c.hellow" Text (&fff) C +- LaTeX document LaTeX (&2a8) TeX +- Draw document DrawFile (&aff) (not changed) +- +- ============================================================================== +- *riscos-shell* +- 10. The shell +- +- - Bangs (!s) are only replaced if they are followed by a space or end-of-line, +- since many pathnames contain them. +- +- - You can prefix the command with "~", which stops any output from being +- displayed. This also means that you don't have to press afterwards, +- and stops the screen from being redrawn. {only in the GUI version} +- +- ============================================================================== +- *riscos-porting* +- 11. Porting new releases to RISC OS +- +- Downloading everything you need: +- +- - Get the latest source distribution (see www.vim.org) +- - Get the runtime environment files (e.g. these help files) +- - Get the RISC OS binary distribution (if possible) +- +- +- Unarchiving: +- +- - Create a raFS disk and put the archives on it +- - Un-gzip them +- - Un-tar them (*tar xELf 50 archive/tar) +- +- +- Recompiling the sources: +- +- - Create c, s, and h directories. +- - Put all the header files in "h". \ +- - Put all the C files in "c". | And lose the extensions +- - Put the assembler file ("swis/s") in "s". / +- - Rename all the files in "proto" to "h", like this: +- raFS::VimSrc.source.proto.file/pro +- becomes +- raFS::VimSrc.source.h.file_pro +- - In the files "h.proto" and "c.termlib", search and replace +- .pro" +- with +- _pro.h" +- - Create a simple Makefile if desired and do "*make -k". +- Use "CC = gcc -DRISCOS -DUSE_GUI -O2 -x c" in the Makefile. +- - Save the binary as !Vim.Vim in the binary distribution. +- +- +- Updating the run-time environment: +- +- - Replace old or missing files inside !Vim.Resources with the +- new files. +- - Remove files in "doc" not ending in "/txt", except for "tags". +- - Lose the extensions from the files in "doc". +- - Edit the "doc.tags" file. Remove extensions from the second column: > +- :%s/^\(.[^\t]*\t.*\)\.txt\t/\1\t/ +- - Remove extensions from the syntax files. Split them into two directories +- to avoid the 77 entry limit on old ADFS filesystems. +- - Edit "Vim:FileType" to match "*.c.*" as well as "*/c" and so on. +- Add filetype checking too. +- - Edit "Vim:Menu" and remove all the keys from the menus: > +- :%s/[^ \t]*// +- < + vim:tw=78:ts=8:ft=help:norl: +--- 1,12 ---- +! *os_risc.txt* For Vim version 7.3. Last change: 2011 May 10 + + + VIM REFERENCE MANUAL by Thomas Leonard + + + *riscos* *RISCOS* *RISC-OS* +! The RISC OS support has been removed from Vim with patch 7.3.187. +! If you would like to use Vim on RISC OS get the files from before that patch. + + + vim:tw=78:ts=8:ft=help:norl: +*** ../vim-7.3.186/src/version.c 2011-05-10 16:12:40.000000000 +0200 +--- src/version.c 2011-05-10 16:37:20.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 187, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +81. At social functions you introduce your husband as "my domain server." + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.188 b/source/ap/vim/patches/7.3.188 new file mode 100644 index 000000000..f58454304 --- /dev/null +++ b/source/ap/vim/patches/7.3.188 @@ -0,0 +1,184 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.188 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.188 +Problem: More RISC OS files to remove. +Solution: Remove them. Update the file list. +Files: src/proto/gui_riscos.pro, src/proto/os_riscos.pro, Filelist + + +*** ../vim-7.3.187/src/proto/gui_riscos.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_riscos.pro 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,66 **** +- /* Prototypes for gui_riscos.c +- * Based on gui_x11_pro.h (10 March 2002 version) +- */ +- void gui_mch_prepare __ARGS((int *argc, char **argv)); +- int gui_mch_init_check __ARGS((void)); +- int gui_mch_init __ARGS((void)); +- void gui_mch_uninit __ARGS((void)); +- void gui_mch_new_colors __ARGS((void)); +- int gui_mch_open __ARGS((void)); +- void gui_init_tooltip_font __ARGS((void)); +- void gui_init_menu_font __ARGS((void));void gui_mch_exit __ARGS((int rc)); +- int gui_mch_get_winpos __ARGS((int *x, int *y)); +- void gui_mch_set_winpos __ARGS((int x, int y)); +- void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height)); +- void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h)); +- int gui_mch_init_font __ARGS((char_u *font_name, int do_fontset)); +- GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing)); +- int gui_mch_adjust_charheight __ARGS((void)); +- void gui_mch_set_font __ARGS((GuiFont font)); +- void gui_mch_set_fontset __ARGS((GuiFontset fontset)); +- void gui_mch_free_font __ARGS((GuiFont font)); +- void gui_mch_free_fontset __ARGS((GuiFontset fontset)); +- GuiFontset gui_mch_get_fontset __ARGS((char_u *name, int giveErrorIfMissing, int fixed_width)); +- guicolor_T gui_mch_get_color __ARGS((char_u *reqname)); +- void gui_mch_set_fg_color __ARGS((guicolor_T color)); +- void gui_mch_set_bg_color __ARGS((guicolor_T color)); +- void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags)); +- int gui_mch_haskey __ARGS((char_u *name)); +- void gui_mch_beep __ARGS((void)); +- void gui_mch_flash __ARGS((int msec)); +- void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc)); +- void gui_mch_iconify __ARGS((void)); +- void gui_mch_set_foreground __ARGS((void)); +- void gui_mch_draw_hollow_cursor __ARGS((guicolor_T color)); +- void gui_mch_draw_part_cursor __ARGS((int w, int h, guicolor_T color)); +- void gui_mch_update __ARGS((void)); +- int gui_mch_wait_for_chars __ARGS((long wtime)); +- void gui_mch_flush __ARGS((void)); +- void gui_mch_clear_block __ARGS((int row1, int col1, int row2, int col2)); +- void gui_mch_clear_all __ARGS((void)); +- void gui_mch_delete_lines __ARGS((int row, int num_lines)); +- void gui_mch_insert_lines __ARGS((int row, int num_lines)); +- void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); +- int clip_mch_own_selection __ARGS((VimClipboard *cbd)); +- void clip_mch_request_selection __ARGS((VimClipboard *cbd)); +- void clip_mch_set_selection __ARGS((VimClipboard *cbd)); +- void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey)); +- void gui_mch_menu_hidden __ARGS((vimmenu_T *menu, int hidden)); +- void gui_mch_draw_menubar __ARGS((void)); +- void gui_mch_set_blinking __ARGS((long waittime, long on, long off)); +- void gui_mch_stop_blink __ARGS((void)); +- void gui_mch_start_blink __ARGS((void)); +- void process_event __ARGS((int event, int *block)); +- void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); +- long_u gui_mch_get_rgb __ARGS((guicolor_T pixel)); +- void gui_mch_getmouse __ARGS((int *x, int *y)); +- void gui_mch_setmouse __ARGS((int x, int y)); +- void gui_mch_drawsign __ARGS((int row, int col, int typenr)); +- void gui_mch_destroy_sign __ARGS((XImage *sign)); +- void gui_mch_mousehide __ARGS((int hide)); +- void mch_set_mouse_shape __ARGS((int shape)); +- void gui_mch_menu_set_tip __ARGS((vimmenu_T *menu)); +- +- void ro_redraw_title __ARGS((int window)); +- int ro_ok_to_quit __ARGS((void)); +- /* vim: set ft=c : */ +--- 0 ---- +*** ../vim-7.3.187/src/proto/os_riscos.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/os_riscos.pro 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,49 **** +- /* os_riscos.c */ +- void mch_write __ARGS((char_u *s, int len)); +- int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt)); +- int mch_char_avail __ARGS((void)); +- long_u mch_avail_mem __ARGS((int special)); +- void mch_delay __ARGS((long msec, int ignoreinput)); +- void mch_suspend __ARGS((void)); +- void mch_init __ARGS((void)); +- int mch_check_win __ARGS((int argc, char **argv)); +- int mch_input_isatty __ARGS((void)); +- int mch_can_restore_title __ARGS((void)); +- int mch_can_restore_icon __ARGS((void)); +- void mch_settitle __ARGS((char_u *title, char_u *icon)); +- void mch_restore_title __ARGS((int which)); +- int mch_get_user_name __ARGS((char_u *s, int len)); +- void mch_get_host_name __ARGS((char_u *s, int len)); +- long mch_get_pid __ARGS((void)); +- int mch_dirname __ARGS((char_u *buf, int len)); +- int mch_FullName __ARGS((char_u *fname, char_u *buf, int len, int force)); +- int mch_isFullName __ARGS((char_u *fname)); +- long mch_getperm __ARGS((char_u *name)); +- int mch_setperm __ARGS((char_u *name, long perm)); +- void mch_hide __ARGS((char_u *name)); +- int mch_isdir __ARGS((char_u *name)); +- int mch_can_exe __ARGS((char_u *name)); +- int mch_nodetype __ARGS((char_u *name)); +- void mch_early_init __ARGS((void)); +- void mch_exit __ARGS((int r)); +- void mch_settmode __ARGS((int tmode)); +- void mch_setmouse __ARGS((int on)); +- int mch_screenmode __ARGS((char_u *arg)); +- int mch_get_shellsize __ARGS((void)); +- void mch_set_shellsize __ARGS((void)); +- void mch_new_shellsize __ARGS((void)); +- int mch_call_shell __ARGS((char_u *cmd, int options)); +- void mch_breakcheck __ARGS((void)); +- int mch_expandpath __ARGS((garray_T *gap, char_u *path, int flags)); +- int expand_section __ARGS((garray_T *gap, char_u *root, char_u *rest, int flags)); +- int mch_expand_wildcards __ARGS((int num_pat, char_u **pat, int *num_file, char_u ***file, int flags)); +- int mch_has_exp_wildcard __ARGS((char_u *p)); +- int mch_has_wildcard __ARGS((char_u *p)); +- int mch_remove __ARGS((char_u *file)); +- char_u *mch_munge_fname __ARGS((char_u *fname)); +- int ro_buflist_add __ARGS((char_u *old_name)); +- int mch_chdir __ARGS((char_u *dir)); +- void mch_read_filetype __ARGS((char_u *file)); +- void mch_set_filetype __ARGS((char_u *file, char_u *type)); +- int mch_check_filetype __ARGS((char_u *fname, char_u *type)); +- /* vim: set ft=c : */ +--- 0 ---- +*** ../vim-7.3.187/Filelist 2011-03-22 18:10:34.000000000 +0100 +--- Filelist 2011-05-10 17:19:21.000000000 +0200 +*************** +*** 428,435 **** + README_os390.txt \ + src/Make_mint.mak \ + src/Make_ro.mak \ +- src/gui_riscos.c \ +- src/gui_riscos.h \ + src/if_sniff.c \ + src/infplist.xml \ + src/link.390 \ +--- 428,433 ---- +*************** +*** 437,446 **** + src/os_beos.h \ + src/os_beos.rsrc \ + src/os_mint.h \ +- src/os_riscos.c \ +- src/os_riscos.h \ +- src/proto/gui_riscos.pro \ +- src/proto/os_riscos.pro \ + src/os_vms_fix.com \ + src/toolbar.phi \ + +--- 435,440 ---- +*** ../vim-7.3.187/src/version.c 2011-05-10 16:41:13.000000000 +0200 +--- src/version.c 2011-05-10 17:20:50.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 188, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +83. Batteries in the TV remote now last for months. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.189 b/source/ap/vim/patches/7.3.189 new file mode 100644 index 000000000..f7a9667c7 --- /dev/null +++ b/source/ap/vim/patches/7.3.189 @@ -0,0 +1,49 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.189 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.189 (after 7.3.186) +Problem: Can't build without +clipboard feature. (Christian Ebert) +Solution: Add the missing #ifdef. +Files: src/normal.c + + +*** ../vim-7.3.188/src/normal.c 2011-05-10 16:12:40.000000000 +0200 +--- src/normal.c 2011-05-10 17:25:26.000000000 +0200 +*************** +*** 1204,1212 **** +--- 1204,1215 ---- + #ifdef FEAT_EVAL + { + int regname = 0; ++ + /* Adjust the register according to 'clipboard', so that when + * "unnamed" is present it becomes '*' or '+' instead of '"'. */ ++ # ifdef FEAT_CLIPBOARD + adjust_clip_reg(®name); ++ # endif + set_reg_var(regname); + } + #endif +*** ../vim-7.3.188/src/version.c 2011-05-10 17:21:34.000000000 +0200 +--- src/version.c 2011-05-10 17:29:21.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 189, + /**/ + +-- +If your nose runs, and your feet smell, you might be upside down. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.190 b/source/ap/vim/patches/7.3.190 new file mode 100644 index 000000000..4adef8ab0 --- /dev/null +++ b/source/ap/vim/patches/7.3.190 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.190 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.190 +Problem: When there is a "containedin" syntax argument highlighting may be + wrong. (Radek) +Solution: Reset current_next_list. (Ben Schmidt) +Files: src/syntax.c + + +*** ../vim-7.3.189/src/syntax.c 2011-04-11 16:56:29.000000000 +0200 +--- src/syntax.c 2011-05-19 12:02:43.000000000 +0200 +*************** +*** 2566,2571 **** +--- 2566,2574 ---- + #endif + update_si_attr(current_state.ga_len - 1); + ++ /* nextgroup= should not match in the end pattern */ ++ current_next_list = NULL; ++ + /* what matches next may be different now, clear it */ + next_match_idx = 0; + next_match_col = MAXCOL; +*** ../vim-7.3.189/src/version.c 2011-05-10 17:29:28.000000000 +0200 +--- src/version.c 2011-05-19 12:13:28.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 190, + /**/ + +-- +From "know your smileys": + :'-D Laughing so much that they're crying + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.191 b/source/ap/vim/patches/7.3.191 new file mode 100644 index 000000000..14b63cea0 --- /dev/null +++ b/source/ap/vim/patches/7.3.191 @@ -0,0 +1,526 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.191 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.191 +Problem: Still some RISC OS stuff to remove. +Solution: Remove files and lines. (Hong Xu) + Remove the 'osfiletype' option code. +Files: README_extra.txt, src/Make_ro.mak, src/INSTALL, src/Makefile, + src/buffer.c, src/eval.c, src/feature.h, src/option.c, + src/option.h, src/structs.h, src/version.c, src/pty.c, Filelist + + +*** ../vim-7.3.190/README_extra.txt 2010-08-15 21:57:32.000000000 +0200 +--- README_extra.txt 2011-05-19 12:35:16.000000000 +0200 +*************** +*** 13,21 **** + + src/os_amiga.* Files for the Amiga port. + +- src/gui_riscos.* +- src/os_riscos.* Files for the RISC OS port. +- + src/gui_beos.* + src/os_beos.* Files for the BeOS port. + +--- 13,18 ---- +*** ../vim-7.3.190/src/Make_ro.mak 2010-08-15 21:57:27.000000000 +0200 +--- src/Make_ro.mak 1970-01-01 01:00:00.000000000 +0100 +*************** +*** 1,135 **** +- # +- # Makefile for Vim on RISC OS - Andy Wingate +- # +- +- GCC = gcc -mthrowback +- CFLAGS = -DRISCOS -DFEAT_GUI +- CC = $(GCC) $(CFLAGS) -O2 +- # -DUP_BC_PC_EXTERN for term.c needed as BC defined in termlib.c and term.c +- +- TERMFLAG = -DUP_BC_PC_EXTERN +- +- ASMFLAGS = -throwback -objasm -gcc +- +- OBJS = o.buffer o.charset o.diff o.digraph o.edit o.eval o.ex_cmds o.ex_cmds2 \ +- o.ex_docmd o.ex_eval o.ex_getln o.fileio o.fold o.getchar \ +- o.hardcopy o.hashtab o.main o.mark o.mbyte \ +- o.memfile o.memline o.menu o.message o.misc1 o.misc2 o.move \ +- o.normal o.ops o.option o.popupmnu o.quickfix o.regexp o.screen \ +- o.search \ +- o.spell o.syntax o.tag o.term o.termlib o.ui o.undo o.version \ +- o.window o.os_riscos o.swis o.gui o.gui_riscos +- +- Vim: $(OBJS) +- $(GCC) -o Vim $(OBJS) +- +- install: Vim +- squeeze -v Vim @.!Vim.Vim +- +- clean: +- create o.!fake! 0 +- wipe o.* ~cf +- remove Vim +- +- o.swis: s.swis +- as $(ASMFLAGS) -o o.swis s.swis +- +- # Rules for object files +- +- o.%: c.% +- $(CC) -c $< -o $@ +- +- o.buffer: c.buffer +- +- o.charset: c.charset +- +- o.digraph: c.digraph +- +- o.diff: c.diff +- +- o.edit: c.edit +- +- o.eval: c.eval +- +- o.ex_cmds: c.ex_cmds +- +- o.ex_cmds2: c.ex_cmds2 +- +- o.ex_docmd: c.ex_docmd +- +- o.ex_eval: c.ex_eval +- +- o.ex_getln: c.ex_getln +- +- o.fileio: c.fileio +- +- o.fold: c.fold +- +- o.getchar: c.getchar +- +- o.hardcopy: c.hardcopy +- +- o.hashtab: c.hashtab +- +- o.gui: c.gui +- +- o.gui_riscos: c.gui_riscos +- +- o.main: c.main +- +- o.mark: c.mark +- +- o.mbyte: c.mbyte +- +- o.memfile: c.memfile +- +- o.memline: c.memline +- +- o.menu: c.menu +- +- o.message: c.message +- +- o.misc1: c.misc1 +- +- o.misc2: c.misc2 +- +- o.move: c.move +- +- o.normal: c.normal +- +- o.ops: c.ops +- +- o.option: c.option +- +- o.os_riscos: c.os_riscos +- +- o.pty: c.pty +- +- o.popupmnu: c.popupmnu +- +- o.quickfix: c.quickfix +- +- o.regexp: c.regexp +- +- o.screen: c.screen +- +- o.search: c.search +- +- o.spell: c.spell +- +- o.syntax: c.syntax +- +- o.tag: c.tag +- +- o.term: c.term +- $(CC) $(TERMFLAG) -c c.term -o o.term +- +- o.termlib: c.termlib +- +- o.ui: c.ui +- +- o.undo: c.undo +- +- o.version: c.version +- +- o.window: c.window +--- 0 ---- +*** ../vim-7.3.190/src/INSTALL 2010-08-15 21:57:28.000000000 +0200 +--- src/INSTALL 2011-05-19 12:36:17.000000000 +0200 +*************** +*** 6,14 **** + Contents: + 1. Generic + 2. Unix +! 3. RISC OS +! 4. OS/2 (with EMX 0.9b) +! 5. Atari MiNT + + See INSTALLami.txt for Amiga + See INSTALLmac.txt for Macintosh +--- 6,13 ---- + Contents: + 1. Generic + 2. Unix +! 3. OS/2 (with EMX 0.9b) +! 4. Atari MiNT + + See INSTALLami.txt for Amiga + See INSTALLmac.txt for Macintosh +*************** +*** 174,198 **** + ./configure --without-local-dir + + +! 3. RISC OS +! ============= +! +! Much file renaming is needed before you can compile anything. +! You'll need UnixLib to link against, GCC and GNU make. +! +! I suggest you get the RISC OS binary distribution, which includes the +! Templates file and the loader. +! +! Try here: http://www.ecs.soton.ac.uk/~tal197 +! +! Do +! :help riscos +! +! within the editor for more information, or read the +! ../runtime/doc/os_risc.txt help file. +! +! +! 4. OS/2 + ======= + + Summary: +--- 173,179 ---- + ./configure --without-local-dir + + +! 3. OS/2 + ======= + + Summary: +*************** +*** 237,243 **** + Check ../runtime/doc/os_os2.txt for additional info on running Vim. + + +! 5. Atari MiNT + ============= + + [NOTE: this is quite old, it might not work anymore] +--- 218,224 ---- + Check ../runtime/doc/os_os2.txt for additional info on running Vim. + + +! 4. Atari MiNT + ============= + + [NOTE: this is quite old, it might not work anymore] +*** ../vim-7.3.190/src/Makefile 2011-04-01 13:05:37.000000000 +0200 +--- src/Makefile 2011-05-19 12:37:52.000000000 +0200 +*************** +*** 29,35 **** + # - Uncomment the line "CONF_OPT_X = --without-x" if you have X11 but + # want to disable using X11 libraries. This speeds up starting Vim, + # but the window title will not be set and the X11 selection can not +! # used. + # - Uncomment the line "CONF_OPT_XSMP = --disable-xsmp" if you have the + # X11 Session Management Protocol (XSMP) library (libSM) but do not + # want to use it. +--- 29,35 ---- + # - Uncomment the line "CONF_OPT_X = --without-x" if you have X11 but + # want to disable using X11 libraries. This speeds up starting Vim, + # but the window title will not be set and the X11 selection can not +! # be used. + # - Uncomment the line "CONF_OPT_XSMP = --disable-xsmp" if you have the + # X11 Session Management Protocol (XSMP) library (libSM) but do not + # want to use it. +*************** +*** 730,741 **** + ### USL for Unix Systems Laboratories (SYSV 4.2) + #EXTRA_DEFS = -DUSL + +- ### RISCos on MIPS without X11 +- #EXTRA_DEFS = -DMIPS +- +- ### RISCos on MIPS with X11 +- #EXTRA_LIBS = -lsun +- + ### (6) A/UX 3.1.1 with gcc (Jim Jagielski) + #CC= gcc -D_POSIX_SOURCE + #CFLAGS= -O2 +--- 730,735 ---- +*************** +*** 1633,1639 **** + RSRC_DIR = os_mac_rsrc + + PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ +! os_mswin.pro os_beos.pro os_vms.pro os_riscos.pro $(PERL_PRO) + + # Default target is making the executable and tools + all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) +--- 1627,1633 ---- + RSRC_DIR = os_mac_rsrc + + PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \ +! os_mswin.pro os_beos.pro os_vms.pro $(PERL_PRO) + + # Default target is making the executable and tools + all: $(VIMTARGET) $(TOOLS) languages $(GUI_BUNDLE) +*** ../vim-7.3.190/src/buffer.c 2011-05-05 17:32:40.000000000 +0200 +--- src/buffer.c 2011-05-19 13:09:25.000000000 +0200 +*************** +*** 1808,1816 **** + #ifdef FEAT_AUTOCMD + clear_string_option(&buf->b_p_ft); + #endif +- #ifdef FEAT_OSFILETYPE +- clear_string_option(&buf->b_p_oft); +- #endif + #ifdef FEAT_CINDENT + clear_string_option(&buf->b_p_cink); + clear_string_option(&buf->b_p_cino); +--- 1808,1813 ---- +*** ../vim-7.3.190/src/eval.c 2011-05-10 16:41:13.000000000 +0200 +--- src/eval.c 2011-05-19 13:09:43.000000000 +0200 +*************** +*** 12076,12084 **** + #ifdef FEAT_OLE + "ole", + #endif +- #ifdef FEAT_OSFILETYPE +- "osfiletype", +- #endif + #ifdef FEAT_PATH_EXTRA + "path_extra", + #endif +--- 12076,12081 ---- +*** ../vim-7.3.190/src/feature.h 2010-08-15 21:57:31.000000000 +0200 +--- src/feature.h 2011-05-19 13:09:56.000000000 +0200 +*************** +*** 506,520 **** + #endif + + /* +- * +osfiletype filetype checking in autocommand patterns. +- * Only on systems that support filetypes (RISC OS). +- */ +- #if 0 +- # define FEAT_OSFILETYPE +- # define DFLT_OFT "Text" +- #endif +- +- /* + * +viminfo reading/writing the viminfo file. Takes about 8Kbyte + * of code. + * VIMINFO_FILE Location of user .viminfo file (should start with $). +--- 506,511 ---- +*** ../vim-7.3.190/src/option.c 2011-04-28 17:24:54.000000000 +0200 +--- src/option.c 2011-05-19 13:11:42.000000000 +0200 +*************** +*** 140,148 **** + #define PV_MOD OPT_BUF(BV_MOD) + #define PV_MPS OPT_BUF(BV_MPS) + #define PV_NF OPT_BUF(BV_NF) +- #ifdef FEAT_OSFILETYPE +- # define PV_OFT OPT_BUF(BV_OFT) +- #endif + #ifdef FEAT_COMPL_FUNC + # define PV_OFU OPT_BUF(BV_OFU) + #endif +--- 140,145 ---- +*************** +*** 337,345 **** + static int p_mod; + static char_u *p_mps; + static char_u *p_nf; +- #ifdef FEAT_OSFILETYPE +- static char_u *p_oft; +- #endif + static int p_pi; + #ifdef FEAT_TEXTOBJ + static char_u *p_qe; +--- 334,339 ---- +*************** +*** 1901,1914 **** + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF, +- #ifdef FEAT_OSFILETYPE +- (char_u *)&p_oft, PV_OFT, +- {(char_u *)DFLT_OFT, (char_u *)0L} +- #else + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} +! #endif +! SCRIPTID_INIT}, + {"paragraphs", "para", P_STRING|P_VI_DEF, + (char_u *)&p_para, PV_NONE, + {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", +--- 1895,1902 ---- + (char_u *)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"osfiletype", "oft", P_STRING|P_ALLOCED|P_VI_DEF, + (char_u *)NULL, PV_NONE, +! {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"paragraphs", "para", P_STRING|P_VI_DEF, + (char_u *)&p_para, PV_NONE, + {(char_u *)"IPLPPPQPP TPHPLIPpLpItpplpipbp", +*************** +*** 5282,5290 **** + #ifdef FEAT_AUTOCMD + check_string_option(&buf->b_p_ft); + #endif +- #ifdef FEAT_OSFILETYPE +- check_string_option(&buf->b_p_oft); +- #endif + #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) + check_string_option(&buf->b_p_cinw); + #endif +--- 5270,5275 ---- +*************** +*** 9665,9673 **** + case PV_MA: return (char_u *)&(curbuf->b_p_ma); + case PV_MOD: return (char_u *)&(curbuf->b_changed); + case PV_NF: return (char_u *)&(curbuf->b_p_nf); +- #ifdef FEAT_OSFILETYPE +- case PV_OFT: return (char_u *)&(curbuf->b_p_oft); +- #endif + case PV_PI: return (char_u *)&(curbuf->b_p_pi); + #ifdef FEAT_TEXTOBJ + case PV_QE: return (char_u *)&(curbuf->b_p_qe); +--- 9650,9655 ---- +*************** +*** 10018,10026 **** + /* Don't copy 'filetype', it must be detected */ + buf->b_p_ft = empty_option; + #endif +- #ifdef FEAT_OSFILETYPE +- buf->b_p_oft = vim_strsave(p_oft); +- #endif + buf->b_p_pi = p_pi; + #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) + buf->b_p_cinw = vim_strsave(p_cinw); +--- 10000,10005 ---- +*** ../vim-7.3.190/src/option.h 2011-02-12 13:59:55.000000000 +0100 +--- src/option.h 2011-05-19 13:11:46.000000000 +0200 +*************** +*** 984,992 **** + , BV_MOD + , BV_MPS + , BV_NF +- #ifdef FEAT_OSFILETYPE +- , BV_OFT +- #endif + #ifdef FEAT_COMPL_FUNC + , BV_OFU + #endif +--- 984,989 ---- +*** ../vim-7.3.190/src/structs.h 2011-05-10 16:41:13.000000000 +0200 +--- src/structs.h 2011-05-19 13:11:58.000000000 +0200 +*************** +*** 1530,1538 **** + int b_p_ml_nobin; /* b_p_ml saved for binary mode */ + int b_p_ma; /* 'modifiable' */ + char_u *b_p_nf; /* 'nrformats' */ +- #ifdef FEAT_OSFILETYPE +- char_u *b_p_oft; /* 'osfiletype' */ +- #endif + int b_p_pi; /* 'preserveindent' */ + #ifdef FEAT_TEXTOBJ + char_u *b_p_qe; /* 'quoteescape' */ +--- 1530,1535 ---- +*** ../vim-7.3.190/src/version.c 2011-05-19 12:14:03.000000000 +0200 +--- src/version.c 2011-05-19 13:26:42.000000000 +0200 +*************** +*** 426,436 **** + "-ole", + # endif + #endif +- #ifdef FEAT_OSFILETYPE +- "+osfiletype", +- #else +- "-osfiletype", +- #endif + #ifdef FEAT_PATH_EXTRA + "+path_extra", + #else +--- 426,431 ---- +*** ../vim-7.3.190/src/pty.c 2011-04-11 14:24:33.000000000 +0200 +--- src/pty.c 2011-05-19 12:43:26.000000000 +0200 +*************** +*** 123,130 **** + static void initmaster __ARGS((int)); + + /* +! * Open all ptys with O_NOCTTY, just to be on the safe side +! * (RISCos mips breaks otherwise) + */ + #ifndef O_NOCTTY + # define O_NOCTTY 0 +--- 123,129 ---- + static void initmaster __ARGS((int)); + + /* +! * Open all ptys with O_NOCTTY, just to be on the safe side. + */ + #ifndef O_NOCTTY + # define O_NOCTTY 0 +*** ../vim-7.3.190/Filelist 2011-05-10 17:21:34.000000000 +0200 +--- Filelist 2011-05-19 13:37:25.000000000 +0200 +*************** +*** 427,433 **** + $(SRC_VMS) \ + README_os390.txt \ + src/Make_mint.mak \ +- src/Make_ro.mak \ + src/if_sniff.c \ + src/infplist.xml \ + src/link.390 \ +--- 427,432 ---- +*** ../vim-7.3.190/src/version.c 2011-05-19 12:14:03.000000000 +0200 +--- src/version.c 2011-05-19 13:26:42.000000000 +0200 +*************** +*** 716,717 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 191, + /**/ + +-- +From "know your smileys": + :-& Eating spaghetti + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.192 b/source/ap/vim/patches/7.3.192 new file mode 100644 index 000000000..5dab19b49 --- /dev/null +++ b/source/ap/vim/patches/7.3.192 @@ -0,0 +1,61 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.192 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.192 +Problem: Ex command ":s/ \?/ /g" splits multi-byte characters into bytes. + (Dominique Pelle) +Solution: Advance over whole character instead of one byte. +Files: src/ex_cmds.c + + +*** ../vim-7.3.191/src/ex_cmds.c 2011-05-10 16:41:13.000000000 +0200 +--- src/ex_cmds.c 2011-05-19 14:23:33.000000000 +0200 +*************** +*** 4625,4631 **** + * for a match in this line again. */ + skip_match = TRUE; + else +! ++matchcol; /* search for a match at next column */ + goto skip; + } + +--- 4625,4639 ---- + * for a match in this line again. */ + skip_match = TRUE; + else +! { +! /* search for a match at next column */ +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! matchcol += mb_ptr2len(sub_firstline + matchcol); +! else +! #endif +! ++matchcol; +! } + goto skip; + } + +*** ../vim-7.3.191/src/version.c 2011-05-19 13:40:47.000000000 +0200 +--- src/version.c 2011-05-19 14:28:44.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 192, + /**/ + +-- +From "know your smileys": + :-F Bucktoothed vampire with one tooth missing + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.193 b/source/ap/vim/patches/7.3.193 new file mode 100644 index 000000000..acee9ec0e --- /dev/null +++ b/source/ap/vim/patches/7.3.193 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.193 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.193 +Problem: In the command line window ":close" doesn't work properly. (Tony + Mechelynck) +Solution: Use Ctrl_C instead of K_IGNORE for cmdwin_result. (Jean-Rene + David) +Files: src/ex_docmd.c, src/ex_getln.c + + +*** ../vim-7.3.192/src/ex_docmd.c 2011-05-10 16:41:13.000000000 +0200 +--- src/ex_docmd.c 2011-05-19 14:42:56.000000000 +0200 +*************** +*** 6472,6478 **** + { + # ifdef FEAT_CMDWIN + if (cmdwin_type != 0) +! cmdwin_result = K_IGNORE; + else + # endif + if (!text_locked() +--- 6472,6478 ---- + { + # ifdef FEAT_CMDWIN + if (cmdwin_type != 0) +! cmdwin_result = Ctrl_C; + else + # endif + if (!text_locked() +*** ../vim-7.3.192/src/ex_getln.c 2011-04-28 17:21:49.000000000 +0200 +--- src/ex_getln.c 2011-05-19 14:42:56.000000000 +0200 +*************** +*** 6324,6329 **** +--- 6324,6335 ---- + ccline.cmdbuff = vim_strsave((char_u *)"qa"); + cmdwin_result = CAR; + } ++ else if (cmdwin_result == Ctrl_C) ++ { ++ /* :q or :close, don't execute any command ++ * and don't modify the cmd window. */ ++ ccline.cmdbuff = NULL; ++ } + else + ccline.cmdbuff = vim_strsave(ml_get_curline()); + if (ccline.cmdbuff == NULL) +*** ../vim-7.3.192/src/version.c 2011-05-19 14:30:07.000000000 +0200 +--- src/version.c 2011-05-19 14:48:12.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 193, + /**/ + +-- +There's no place like $(HOME)! + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.194 b/source/ap/vim/patches/7.3.194 new file mode 100644 index 000000000..5a73c0098 --- /dev/null +++ b/source/ap/vim/patches/7.3.194 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.194 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.194 +Problem: When "b" is a symlink to directory "a", resolve("b/") doesn't + result in "a/". (ZyX) +Solution: Remove the trailing slash. (Jean-Rene David) +Files: src/eval.c + + +*** ../vim-7.3.193/src/eval.c 2011-05-19 13:40:47.000000000 +0200 +--- src/eval.c 2011-05-19 14:55:27.000000000 +0200 +*************** +*** 14980,14986 **** +--- 14980,14989 ---- + + len = STRLEN(p); + if (len > 0 && after_pathsep(p, p + len)) ++ { + has_trailing_pathsep = TRUE; ++ p[len - 1] = NUL; /* the trailing slash breaks readlink() */ ++ } + + q = getnextcomp(p); + if (*q != NUL) +*** ../vim-7.3.193/src/version.c 2011-05-19 14:50:49.000000000 +0200 +--- src/version.c 2011-05-19 14:54:40.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 194, + /**/ + +-- +Momento mori, ergo carpe diem + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.195 b/source/ap/vim/patches/7.3.195 new file mode 100644 index 000000000..ba1fc2192 --- /dev/null +++ b/source/ap/vim/patches/7.3.195 @@ -0,0 +1,199 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.195 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.195 +Problem: "} else" causes following lines to be indented too much. (Rouben + Rostamian) +Solution: Better detection for the "else". (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.194/src/misc1.c 2011-05-10 16:41:13.000000000 +0200 +--- src/misc1.c 2011-05-19 16:30:28.000000000 +0200 +*************** +*** 5482,5489 **** + * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or + * '}'. + * Don't consider "} else" a terminated line. +! * Don't consider a line where there are unmatched opening braces before '}', +! * ';' or ',' a terminated line. + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +--- 5482,5489 ---- + * Recognize a line that starts with '{' or '}', or ends with ';', ',', '{' or + * '}'. + * Don't consider "} else" a terminated line. +! * If a line begins with an "else", only consider it terminated if no unmatched +! * opening braces follow (handle "else { foo();" correctly). + * Return the character terminating the line (ending char's have precedence if + * both apply in order to determine initializations). + */ +*************** +*** 5493,5513 **** + int incl_open; /* include '{' at the end as terminator */ + int incl_comma; /* recognize a trailing comma */ + { +! char_u found_start = 0; +! unsigned n_open = 0; + + s = cin_skipcomment(s); + + if (*s == '{' || (*s == '}' && !cin_iselse(s))) + found_start = *s; + + while (*s) + { + /* skip over comments, "" strings and 'c'haracters */ + s = skip_string(cin_skipcomment(s)); + if (*s == '}' && n_open > 0) + --n_open; +! if (n_open == 0 + && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; +--- 5493,5517 ---- + int incl_open; /* include '{' at the end as terminator */ + int incl_comma; /* recognize a trailing comma */ + { +! char_u found_start = 0; +! unsigned n_open = 0; +! int is_else = FALSE; + + s = cin_skipcomment(s); + + if (*s == '{' || (*s == '}' && !cin_iselse(s))) + found_start = *s; + ++ if (!found_start) ++ is_else = cin_iselse(s); ++ + while (*s) + { + /* skip over comments, "" strings and 'c'haracters */ + s = skip_string(cin_skipcomment(s)); + if (*s == '}' && n_open > 0) + --n_open; +! if ((!is_else || n_open == 0) + && (*s == ';' || *s == '}' || (incl_comma && *s == ',')) + && cin_nocode(s + 1)) + return *s; +*** ../vim-7.3.194/src/testdir/test3.in 2011-05-10 13:38:23.000000000 +0200 +--- src/testdir/test3.in 2011-05-19 16:29:01.000000000 +0200 +*************** +*** 1345,1351 **** + + STARTTEST + :set cino& +! 2kdd=][ + ENDTEST + + void func(void) +--- 1345,1351 ---- + + STARTTEST + :set cino& +! 2kdd=4][ + ENDTEST + + void func(void) +*************** +*** 1359,1364 **** +--- 1359,1392 ---- + printf("Foo!\n"); + } + ++ void func1(void) ++ { ++ char* tab[] = {"foo", "bar", ++ "baz", "quux", ++ "this line used", "to be indented incorrectly"}; ++ foo(); ++ } ++ ++ void func2(void) ++ { ++ int tab[] = ++ {1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("This line used to be indented incorrectly.\n"); ++ } ++ ++ void func3(void) ++ { ++ int tab[] = { ++ 1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("Don't you dare indent this line incorrectly!\n); ++ } ++ + STARTTEST + :set cino& + 2kdd=][ +*** ../vim-7.3.194/src/testdir/test3.ok 2011-05-10 13:38:23.000000000 +0200 +--- src/testdir/test3.ok 2011-05-19 16:29:01.000000000 +0200 +*************** +*** 1216,1221 **** +--- 1216,1249 ---- + printf("Foo!\n"); + } + ++ void func1(void) ++ { ++ char* tab[] = {"foo", "bar", ++ "baz", "quux", ++ "this line used", "to be indented incorrectly"}; ++ foo(); ++ } ++ ++ void func2(void) ++ { ++ int tab[] = ++ {1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("This line used to be indented incorrectly.\n"); ++ } ++ ++ void func3(void) ++ { ++ int tab[] = { ++ 1, 2, ++ 3, 4, ++ 5, 6}; ++ ++ printf("Don't you dare indent this line incorrectly!\n); ++ } ++ + + void func(void) + { +*** ../vim-7.3.194/src/version.c 2011-05-19 14:59:07.000000000 +0200 +--- src/version.c 2011-05-19 16:34:16.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 195, + /**/ + +-- +I AM THANKFUL... +...for the taxes that I pay because it means that I am employed. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.196 b/source/ap/vim/patches/7.3.196 new file mode 100644 index 000000000..0d6be8c9f --- /dev/null +++ b/source/ap/vim/patches/7.3.196 @@ -0,0 +1,224 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.196 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.196 +Problem: Can't intercept a character that is going to be inserted. +Solution: Add the InsertCharPre autocommand event. (Jakson A. Aquino) +Files: runtime/doc/autocmd.txt, runtime/doc/eval.txt, + runtime/doc/map.txt, src/edit.c, src/eval.c, src/fileio.c, + src/vim.h + + +*** ../mercurial/vim73/runtime/doc/autocmd.txt 2011-04-28 19:01:26.000000000 +0200 +--- runtime/doc/autocmd.txt 2011-05-19 17:12:17.000000000 +0200 +*************** +*** 299,304 **** +--- 299,306 ---- + |InsertEnter| starting Insert mode + |InsertChange| when typing while in Insert or Replace mode + |InsertLeave| when leaving Insert mode ++ |InsertCharPre| when a character was typed in Insert mode, before ++ inserting it + + |ColorScheme| after loading a color scheme + +*************** +*** 657,662 **** +--- 659,675 ---- + indicates the new mode. + Be careful not to move the cursor or do + anything else that the user does not expect. ++ *InsertCharPre* ++ InsertCharPre When a character is typed in Insert mode, ++ before inserting the char. ++ The |v:char| variable indicates the char typed ++ and can be changed during the event to insert ++ a different character. When |v:char| is set ++ to more than one character this text is ++ inserted literally. ++ It is not allowed to change the text |textlock|. ++ The event is not triggered when 'paste' is ++ set. + *InsertEnter* + InsertEnter Just before starting Insert mode. Also for + Replace mode and Virtual Replace mode. The +*** ../mercurial/vim73/runtime/doc/eval.txt 2011-05-19 12:22:41.000000000 +0200 +--- runtime/doc/eval.txt 2011-05-19 16:55:58.000000000 +0200 +*************** +*** 1293,1298 **** +--- 1293,1299 ---- + *v:char* *char-variable* + v:char Argument for evaluating 'formatexpr' and used for the typed + character when using in an abbreviation |:map-|. ++ It is also used by the |InsertPreChar| event. + + *v:charconvert_from* *charconvert_from-variable* + v:charconvert_from +*** ../mercurial/vim73/runtime/doc/map.txt 2011-05-10 17:17:38.000000000 +0200 +--- runtime/doc/map.txt 2011-05-19 16:40:34.000000000 +0200 +*************** +*** 226,232 **** + + For abbreviations |v:char| is set to the character that was typed to trigger + the abbreviation. You can use this to decide how to expand the {lhs}. You +! can't change v:char and you should not insert it. + + Be very careful about side effects! The expression is evaluated while + obtaining characters, you may very well make the command dysfunctional. +--- 226,232 ---- + + For abbreviations |v:char| is set to the character that was typed to trigger + the abbreviation. You can use this to decide how to expand the {lhs}. You +! you should not either insert or change the v:char. + + Be very careful about side effects! The expression is evaluated while + obtaining characters, you may very well make the command dysfunctional. +*** ../mercurial/vim73/src/edit.c 2011-05-10 14:22:10.000000000 +0200 +--- src/edit.c 2011-05-19 17:20:53.000000000 +0200 +*************** +*** 1381,1390 **** + goto do_intr; + #endif + + /* + * Insert a nomal character. + */ +! normalchar: + #ifdef FEAT_SMARTINDENT + /* Try to perform smart-indenting. */ + ins_try_si(c); +--- 1381,1425 ---- + goto do_intr; + #endif + ++ normalchar: + /* + * Insert a nomal character. + */ +! #ifdef FEAT_AUTOCMD +! if (!p_paste) +! { +! /* Trigger the InsertCharPre event. Lock the text to avoid +! * weird things from happening. */ +! set_vim_var_char(c); +! ++textlock; +! if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, +! FALSE, curbuf)) +! { +! /* Get the new value of v:char. If it is more than one +! * character insert it literally. */ +! char_u *s = get_vim_var_str(VV_CHAR); +! if (MB_CHARLEN(s) > 1) +! { +! if (stop_arrow() != FAIL) +! { +! ins_str(s); +! AppendToRedobuffLit(s, -1); +! } +! c = NUL; +! } +! else +! c = PTR2CHAR(s); +! } +! +! set_vim_var_string(VV_CHAR, NULL, -1); +! --textlock; +! +! /* If the new value is an empty string then don't insert a +! * char. */ +! if (c == NUL) +! break; +! } +! #endif + #ifdef FEAT_SMARTINDENT + /* Try to perform smart-indenting. */ + ins_try_si(c); +*************** +*** 3491,3501 **** + return; + } + p += len; +! #ifdef FEAT_MBYTE +! c = mb_ptr2char(p); +! #else +! c = *p; +! #endif + ins_compl_addleader(c); + } + +--- 3526,3532 ---- + return; + } + p += len; +! c = PTR2CHAR(p); + ins_compl_addleader(c); + } + +*** ../mercurial/vim73/src/eval.c 2011-05-19 14:59:07.000000000 +0200 +--- src/eval.c 2011-05-19 16:40:39.000000000 +0200 +*************** +*** 352,358 **** + {VV_NAME("swapname", VAR_STRING), VV_RO}, + {VV_NAME("swapchoice", VAR_STRING), 0}, + {VV_NAME("swapcommand", VAR_STRING), VV_RO}, +! {VV_NAME("char", VAR_STRING), VV_RO}, + {VV_NAME("mouse_win", VAR_NUMBER), 0}, + {VV_NAME("mouse_lnum", VAR_NUMBER), 0}, + {VV_NAME("mouse_col", VAR_NUMBER), 0}, +--- 352,358 ---- + {VV_NAME("swapname", VAR_STRING), VV_RO}, + {VV_NAME("swapchoice", VAR_STRING), 0}, + {VV_NAME("swapcommand", VAR_STRING), VV_RO}, +! {VV_NAME("char", VAR_STRING), 0}, + {VV_NAME("mouse_win", VAR_NUMBER), 0}, + {VV_NAME("mouse_lnum", VAR_NUMBER), 0}, + {VV_NAME("mouse_col", VAR_NUMBER), 0}, +*** ../mercurial/vim73/src/fileio.c 2011-05-10 16:41:13.000000000 +0200 +--- src/fileio.c 2011-05-19 16:40:39.000000000 +0200 +*************** +*** 7662,7667 **** +--- 7662,7668 ---- + {"InsertChange", EVENT_INSERTCHANGE}, + {"InsertEnter", EVENT_INSERTENTER}, + {"InsertLeave", EVENT_INSERTLEAVE}, ++ {"InsertCharPre", EVENT_INSERTCHARPRE}, + {"MenuPopup", EVENT_MENUPOPUP}, + {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST}, + {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE}, +*** ../mercurial/vim73/src/vim.h 2011-05-10 16:41:13.000000000 +0200 +--- src/vim.h 2011-05-19 16:40:39.000000000 +0200 +*************** +*** 1274,1279 **** +--- 1274,1280 ---- + EVENT_WINENTER, /* after entering a window */ + EVENT_WINLEAVE, /* before leaving a window */ + EVENT_ENCODINGCHANGED, /* after changing the 'encoding' option */ ++ EVENT_INSERTCHARPRE, /* before inserting a char */ + EVENT_CURSORHOLD, /* cursor in same position for a while */ + EVENT_CURSORHOLDI, /* idem, in Insert mode */ + EVENT_FUNCUNDEFINED, /* if calling a function which doesn't exist */ +*** ../vim-7.3.195/src/version.c 2011-05-19 16:35:05.000000000 +0200 +--- src/version.c 2011-05-19 17:15:41.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 196, + /**/ + +-- +I AM THANKFUL... +...for the mess to clean after a party because it means I have +been surrounded by friends. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.197 b/source/ap/vim/patches/7.3.197 new file mode 100644 index 000000000..c33a2cb29 --- /dev/null +++ b/source/ap/vim/patches/7.3.197 @@ -0,0 +1,78 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.197 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.197 +Problem: When a QuickfixCmdPost event removes all errors, Vim still tries + to jump to the first error, resulting in E42. +Solution: Get the number of error after the autocmd event. (Mike Lundy) +Files: src/quickfix.c + + +*** ../mercurial/vim73/src/quickfix.c 2011-05-10 16:41:13.000000000 +0200 +--- src/quickfix.c 2011-05-19 17:34:11.000000000 +0200 +*************** +*** 2813,2829 **** + (eap->cmdidx != CMD_grepadd + && eap->cmdidx != CMD_lgrepadd), + *eap->cmdlinep); + #ifdef FEAT_AUTOCMD + if (au_name != NULL) + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); + #endif + if (res > 0 && !eap->forceit) +- { +- if (wp != NULL) +- qi = GET_LOC_LIST(wp); + qf_jump(qi, 0, 0, FALSE); /* display first error */ +- } + + mch_remove(fname); + vim_free(fname); +--- 2813,2833 ---- + (eap->cmdidx != CMD_grepadd + && eap->cmdidx != CMD_lgrepadd), + *eap->cmdlinep); ++ if (wp != NULL) ++ qi = GET_LOC_LIST(wp); + #ifdef FEAT_AUTOCMD + if (au_name != NULL) ++ { + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); ++ if (qi->qf_curlist < qi->qf_listcount) ++ res = qi->qf_lists[qi->qf_curlist].qf_count; ++ else ++ res = 0; ++ } + #endif + if (res > 0 && !eap->forceit) + qf_jump(qi, 0, 0, FALSE); /* display first error */ + + mch_remove(fname); + vim_free(fname); +*** ../vim-7.3.196/src/version.c 2011-05-19 17:25:36.000000000 +0200 +--- src/version.c 2011-05-19 17:41:50.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 197, + /**/ + +-- +I AM THANKFUL... +...for the clothes that fit a little too snug because it +means I have more than enough to eat. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.198 b/source/ap/vim/patches/7.3.198 new file mode 100644 index 000000000..5ef4a8aad --- /dev/null +++ b/source/ap/vim/patches/7.3.198 @@ -0,0 +1,403 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.198 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.198 +Problem: No completion for ":lang". +Solution: Get locales to complete from. (Dominique Pelle) +Files: src/eval.c, src/ex_cmds2.c, src/ex_getln.c, + src/proto/ex_cmds2.pro, src/proto/ex_getln.pro, src/vim.h + + +*** ../mercurial/vim73/src/eval.c 2011-05-19 17:25:36.000000000 +0200 +--- src/eval.c 2011-05-19 17:52:02.000000000 +0200 +*************** +*** 911,916 **** +--- 911,917 ---- + hash_clear(&compat_hashtab); + + free_scriptnames(); ++ free_locales(); + + /* global variables */ + vars_clear(&globvarht); +*** ../mercurial/vim73/src/ex_cmds2.c 2011-05-10 16:41:13.000000000 +0200 +--- src/ex_cmds2.c 2011-05-19 18:16:54.000000000 +0200 +*************** +*** 1476,1482 **** + #endif + + /* +! * Ask the user what to do when abondoning a changed buffer. + * Must check 'write' option first! + */ + void +--- 1476,1482 ---- + #endif + + /* +! * Ask the user what to do when abandoning a changed buffer. + * Must check 'write' option first! + */ + void +*************** +*** 4153,4158 **** +--- 4153,4234 ---- + } + + # if defined(FEAT_CMDL_COMPL) || defined(PROTO) ++ ++ static char_u **locales = NULL; /* Array of all available locales */ ++ static int did_init_locales = FALSE; ++ ++ static void init_locales __ARGS((void)); ++ static char_u **find_locales __ARGS((void)); ++ ++ /* ++ * Lazy initialization of all available locales. ++ */ ++ static void ++ init_locales() ++ { ++ if (!did_init_locales) ++ { ++ did_init_locales = TRUE; ++ locales = find_locales(); ++ } ++ } ++ ++ /* Return an array of strings for all available locales + NULL for the ++ * last element. Return NULL in case of error. */ ++ static char_u ** ++ find_locales() ++ { ++ garray_T locales_ga; ++ char_u *loc; ++ ++ /* Find all available locales by running command "locale -a". If this ++ * doesn't work we won't have completion. */ ++ char_u *locale_a = get_cmd_output((char_u *)"locale -a", ++ NULL, SHELL_SILENT); ++ if (locale_a == NULL) ++ return NULL; ++ ga_init2(&locales_ga, sizeof(char_u *), 20); ++ ++ /* Transform locale_a string where each locale is separated by "\n" ++ * into an array of locale strings. */ ++ loc = (char_u *)strtok((char *)locale_a, "\n"); ++ ++ while (loc != NULL) ++ { ++ if (ga_grow(&locales_ga, 1) == FAIL) ++ break; ++ loc = vim_strsave(loc); ++ if (loc == NULL) ++ break; ++ ++ ((char_u **)locales_ga.ga_data)[locales_ga.ga_len++] = loc; ++ loc = (char_u *)strtok(NULL, "\n"); ++ } ++ vim_free(locale_a); ++ if (ga_grow(&locales_ga, 1) == FAIL) ++ { ++ ga_clear(&locales_ga); ++ return NULL; ++ } ++ ((char_u **)locales_ga.ga_data)[locales_ga.ga_len] = NULL; ++ return (char_u **)locales_ga.ga_data; ++ } ++ ++ # if defined(EXITFREE) || defined(PROTO) ++ void ++ free_locales() ++ { ++ int i; ++ if (locales != NULL) ++ { ++ for (i = 0; locales[i] != NULL; i++) ++ vim_free(locales[i]); ++ vim_free(locales); ++ locales = NULL; ++ } ++ } ++ # endif ++ + /* + * Function given to ExpandGeneric() to obtain the possible arguments of the + * ":language" command. +*************** +*** 4168,4174 **** + return (char_u *)"ctype"; + if (idx == 2) + return (char_u *)"time"; +! return NULL; + } + # endif + +--- 4244,4268 ---- + return (char_u *)"ctype"; + if (idx == 2) + return (char_u *)"time"; +! +! init_locales(); +! if (locales == NULL) +! return NULL; +! return locales[idx - 3]; +! } +! +! /* +! * Function given to ExpandGeneric() to obtain the available locales. +! */ +! char_u * +! get_locales(xp, idx) +! expand_T *xp UNUSED; +! int idx; +! { +! init_locales(); +! if (locales == NULL) +! return NULL; +! return locales[idx]; + } + # endif + +*** ../mercurial/vim73/src/ex_getln.c 2011-05-19 14:50:49.000000000 +0200 +--- src/ex_getln.c 2011-05-19 18:18:49.000000000 +0200 +*************** +*** 4571,4618 **** + int context; + char_u *((*func)__ARGS((expand_T *, int))); + int ic; + } tab[] = + { +! {EXPAND_COMMANDS, get_command_name, FALSE}, +! {EXPAND_BEHAVE, get_behave_arg, TRUE}, + #ifdef FEAT_USR_CMDS +! {EXPAND_USER_COMMANDS, get_user_commands, FALSE}, +! {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE}, +! {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE}, +! {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE}, + #endif + #ifdef FEAT_EVAL +! {EXPAND_USER_VARS, get_user_var_name, FALSE}, +! {EXPAND_FUNCTIONS, get_function_name, FALSE}, +! {EXPAND_USER_FUNC, get_user_func_name, FALSE}, +! {EXPAND_EXPRESSION, get_expr_name, FALSE}, + #endif + #ifdef FEAT_MENU +! {EXPAND_MENUS, get_menu_name, FALSE}, +! {EXPAND_MENUNAMES, get_menu_names, FALSE}, + #endif + #ifdef FEAT_SYN_HL +! {EXPAND_SYNTAX, get_syntax_name, TRUE}, + #endif +! {EXPAND_HIGHLIGHT, get_highlight_name, TRUE}, + #ifdef FEAT_AUTOCMD +! {EXPAND_EVENTS, get_event_name, TRUE}, +! {EXPAND_AUGROUP, get_augroup_name, TRUE}, + #endif + #ifdef FEAT_CSCOPE +! {EXPAND_CSCOPE, get_cscope_name, TRUE}, + #endif + #ifdef FEAT_SIGNS +! {EXPAND_SIGN, get_sign_name, TRUE}, + #endif + #ifdef FEAT_PROFILE +! {EXPAND_PROFILE, get_profile_name, TRUE}, + #endif + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) +! {EXPAND_LANGUAGE, get_lang_arg, TRUE}, + #endif +! {EXPAND_ENV_VARS, get_env_name, TRUE}, + }; + int i; + +--- 4571,4620 ---- + int context; + char_u *((*func)__ARGS((expand_T *, int))); + int ic; ++ int escaped; + } tab[] = + { +! {EXPAND_COMMANDS, get_command_name, FALSE, TRUE}, +! {EXPAND_BEHAVE, get_behave_arg, TRUE, TRUE}, + #ifdef FEAT_USR_CMDS +! {EXPAND_USER_COMMANDS, get_user_commands, FALSE, TRUE}, +! {EXPAND_USER_CMD_FLAGS, get_user_cmd_flags, FALSE, TRUE}, +! {EXPAND_USER_NARGS, get_user_cmd_nargs, FALSE, TRUE}, +! {EXPAND_USER_COMPLETE, get_user_cmd_complete, FALSE, TRUE}, + #endif + #ifdef FEAT_EVAL +! {EXPAND_USER_VARS, get_user_var_name, FALSE, TRUE}, +! {EXPAND_FUNCTIONS, get_function_name, FALSE, TRUE}, +! {EXPAND_USER_FUNC, get_user_func_name, FALSE, TRUE}, +! {EXPAND_EXPRESSION, get_expr_name, FALSE, TRUE}, + #endif + #ifdef FEAT_MENU +! {EXPAND_MENUS, get_menu_name, FALSE, TRUE}, +! {EXPAND_MENUNAMES, get_menu_names, FALSE, TRUE}, + #endif + #ifdef FEAT_SYN_HL +! {EXPAND_SYNTAX, get_syntax_name, TRUE, TRUE}, + #endif +! {EXPAND_HIGHLIGHT, get_highlight_name, TRUE, TRUE}, + #ifdef FEAT_AUTOCMD +! {EXPAND_EVENTS, get_event_name, TRUE, TRUE}, +! {EXPAND_AUGROUP, get_augroup_name, TRUE, TRUE}, + #endif + #ifdef FEAT_CSCOPE +! {EXPAND_CSCOPE, get_cscope_name, TRUE, TRUE}, + #endif + #ifdef FEAT_SIGNS +! {EXPAND_SIGN, get_sign_name, TRUE, TRUE}, + #endif + #ifdef FEAT_PROFILE +! {EXPAND_PROFILE, get_profile_name, TRUE, TRUE}, + #endif + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) +! {EXPAND_LANGUAGE, get_lang_arg, TRUE, FALSE}, +! {EXPAND_LOCALES, get_locales, TRUE, FALSE}, + #endif +! {EXPAND_ENV_VARS, get_env_name, TRUE, TRUE}, + }; + int i; + +*************** +*** 4626,4632 **** + { + if (tab[i].ic) + regmatch.rm_ic = TRUE; +! ret = ExpandGeneric(xp, ®match, num_file, file, tab[i].func); + break; + } + } +--- 4628,4635 ---- + { + if (tab[i].ic) + regmatch.rm_ic = TRUE; +! ret = ExpandGeneric(xp, ®match, num_file, file, +! tab[i].func, tab[i].escaped); + break; + } + } +*************** +*** 4648,4660 **** + * Returns OK when no problems encountered, FAIL for error (out of memory). + */ + int +! ExpandGeneric(xp, regmatch, num_file, file, func) + expand_T *xp; + regmatch_T *regmatch; + int *num_file; + char_u ***file; + char_u *((*func)__ARGS((expand_T *, int))); + /* returns a string from the list */ + { + int i; + int count = 0; +--- 4651,4664 ---- + * Returns OK when no problems encountered, FAIL for error (out of memory). + */ + int +! ExpandGeneric(xp, regmatch, num_file, file, func, escaped) + expand_T *xp; + regmatch_T *regmatch; + int *num_file; + char_u ***file; + char_u *((*func)__ARGS((expand_T *, int))); + /* returns a string from the list */ ++ int escaped; + { + int i; + int count = 0; +*************** +*** 4679,4685 **** + { + if (round) + { +! str = vim_strsave_escaped(str, (char_u *)" \t\\."); + (*file)[count] = str; + #ifdef FEAT_MENU + if (func == get_menu_names && str != NULL) +--- 4683,4692 ---- + { + if (round) + { +! if (escaped) +! str = vim_strsave_escaped(str, (char_u *)" \t\\."); +! else +! str = vim_strsave(str); + (*file)[count] = str; + #ifdef FEAT_MENU + if (func == get_menu_names && str != NULL) +*** ../mercurial/vim73/src/proto/ex_cmds2.pro 2010-05-15 21:22:11.000000000 +0200 +--- src/proto/ex_cmds2.pro 2011-05-19 17:53:52.000000000 +0200 +*************** +*** 83,87 **** +--- 83,89 ---- + char_u *get_mess_lang __ARGS((void)); + void set_lang_var __ARGS((void)); + void ex_language __ARGS((exarg_T *eap)); ++ void free_locales __ARGS((void)); + char_u *get_lang_arg __ARGS((expand_T *xp, int idx)); ++ char_u *get_locales __ARGS((expand_T *xp, int idx)); + /* vim: set ft=c : */ +*** ../mercurial/vim73/src/proto/ex_getln.pro 2010-08-16 21:23:30.000000000 +0200 +--- src/proto/ex_getln.pro 2011-05-19 17:54:00.000000000 +0200 +*************** +*** 31,37 **** + char_u *addstar __ARGS((char_u *fname, int len, int context)); + void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); + int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); +! int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)))); + char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); + void init_history __ARGS((void)); + int get_histtype __ARGS((char_u *name)); +--- 31,37 ---- + char_u *addstar __ARGS((char_u *fname, int len, int context)); + void set_cmd_context __ARGS((expand_T *xp, char_u *str, int len, int col)); + int expand_cmdline __ARGS((expand_T *xp, char_u *str, int col, int *matchcount, char_u ***matches)); +! int ExpandGeneric __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file, char_u *((*func)(expand_T *, int)), int escaped)); + char_u *globpath __ARGS((char_u *path, char_u *file, int expand_options)); + void init_history __ARGS((void)); + int get_histtype __ARGS((char_u *name)); +*** ../mercurial/vim73/src/vim.h 2011-05-19 17:25:36.000000000 +0200 +--- src/vim.h 2011-05-19 17:52:02.000000000 +0200 +*************** +*** 779,784 **** +--- 779,785 ---- + #define EXPAND_FILETYPE 37 + #define EXPAND_FILES_IN_PATH 38 + #define EXPAND_OWNSYNTAX 39 ++ #define EXPAND_LOCALES 40 + + /* Values for exmode_active (0 is no exmode) */ + #define EXMODE_NORMAL 1 +*** ../vim-7.3.197/src/version.c 2011-05-19 17:42:54.000000000 +0200 +--- src/version.c 2011-05-19 18:24:58.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 198, + /**/ + +-- +The primary purpose of the DATA statement is to give names to constants; +instead of referring to pi as 3.141592653589793 at every appearance, the +variable PI can be given that value with a DATA statement and used instead +of the longer form of the constant. This also simplifies modifying the +program, should the value of pi change. + -- FORTRAN manual for Xerox Computers + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.199 b/source/ap/vim/patches/7.3.199 new file mode 100644 index 000000000..8bdd97ab1 --- /dev/null +++ b/source/ap/vim/patches/7.3.199 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.199 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.199 +Problem: MS-Windows: Compilation problem of OLE with MingW compiler. +Solution: Put #ifdef around declarations. (Guopeng Wen) +Files: src/if_ole.h + + +*** ../mercurial/vim73/src/if_ole.h 2010-05-15 21:22:11.000000000 +0200 +--- src/if_ole.h 2011-05-25 12:05:50.000000000 +0200 +*************** +*** 46,53 **** + /* header files for imported files */ + #include "oaidl.h" + +! void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +! void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + + #ifndef __IVim_INTERFACE_DEFINED__ + #define __IVim_INTERFACE_DEFINED__ +--- 46,56 ---- + /* header files for imported files */ + #include "oaidl.h" + +! #ifndef __MIDL_user_allocate_free_DEFINED__ +! #define __MIDL_user_allocate_free_DEFINED__ +! void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +! void __RPC_USER MIDL_user_free( void __RPC_FAR * ); +! #endif + + #ifndef __IVim_INTERFACE_DEFINED__ + #define __IVim_INTERFACE_DEFINED__ +*** ../vim-7.3.198/src/version.c 2011-05-19 18:26:34.000000000 +0200 +--- src/version.c 2011-05-25 12:08:54.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 199, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +104. When people ask about the Presidential Election you ask "Which country?" + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.200 b/source/ap/vim/patches/7.3.200 new file mode 100644 index 000000000..601947119 --- /dev/null +++ b/source/ap/vim/patches/7.3.200 @@ -0,0 +1,75 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.200 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.200 (after 7.3.198) +Problem: CTRL-D doesn't complete :lang. +Solution: Add the missing part of the change. (Dominique Pelle) +Files: src/ex_docmd.c + + +*** ../mercurial/vim73/src/ex_docmd.c 2011-05-19 14:50:49.000000000 +0200 +--- src/ex_docmd.c 2011-05-25 12:45:02.000000000 +0200 +*************** +*** 3861,3873 **** + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) + case CMD_language: +! if (*skiptowhite(arg) == NUL) + { + xp->xp_context = EXPAND_LANGUAGE; + xp->xp_pattern = arg; + } + else +! xp->xp_context = EXPAND_NOTHING; + break; + #endif + #if defined(FEAT_PROFILE) +--- 3861,3884 ---- + #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ + && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) + case CMD_language: +! p = skiptowhite(arg); +! if (*p == NUL) + { + xp->xp_context = EXPAND_LANGUAGE; + xp->xp_pattern = arg; + } + else +! { +! if ( STRNCMP(arg, "messages", p - arg) == 0 +! || STRNCMP(arg, "ctype", p - arg) == 0 +! || STRNCMP(arg, "time", p - arg) == 0) +! { +! xp->xp_context = EXPAND_LOCALES; +! xp->xp_pattern = skipwhite(p); +! } +! else +! xp->xp_context = EXPAND_NOTHING; +! } + break; + #endif + #if defined(FEAT_PROFILE) +*** ../vim-7.3.199/src/version.c 2011-05-25 12:09:46.000000000 +0200 +--- src/version.c 2011-05-25 12:49:49.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 200, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +105. When someone asks you for your address, you tell them your URL. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.201 b/source/ap/vim/patches/7.3.201 new file mode 100644 index 000000000..0481afd85 --- /dev/null +++ b/source/ap/vim/patches/7.3.201 @@ -0,0 +1,124 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.201 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.201 (after 7.3.195) +Problem: "} else" still causes following lines to be indented too much. +Solution: Better detection for the "else" block. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../mercurial/vim73/src/misc1.c 2011-05-19 16:35:05.000000000 +0200 +--- src/misc1.c 2011-05-25 13:29:45.000000000 +0200 +*************** +*** 7541,7557 **** + + /* + * When searching for a terminated line, don't use the +! * one between the "if" and the "else". + * Need to use the scope of this "else". XXX + * If whilelevel != 0 continue looking for a "do {". + */ +! if (cin_iselse(l) +! && whilelevel == 0 +! && ((trypos = find_start_brace(ind_maxcomment)) +! == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! ind_maxparen, ind_maxcomment) == FAIL)) +! break; + } + + /* +--- 7541,7565 ---- + + /* + * When searching for a terminated line, don't use the +! * one between the "if" and the matching "else". + * Need to use the scope of this "else". XXX + * If whilelevel != 0 continue looking for a "do {". + */ +! if (cin_iselse(l) && whilelevel == 0) +! { +! /* If we're looking at "} else", let's make sure we +! * find the opening brace of the enclosing scope, +! * not the one from "if () {". */ +! if (*l == '}') +! curwin->w_cursor.col = +! (l - ml_get_curline()) + 1; +! +! if ((trypos = find_start_brace(ind_maxcomment)) +! == NULL + || find_match(LOOKFOR_IF, trypos->lnum, +! ind_maxparen, ind_maxcomment) == FAIL) +! break; +! } + } + + /* +*** ../mercurial/vim73/src/testdir/test3.in 2011-05-19 16:35:05.000000000 +0200 +--- src/testdir/test3.in 2011-05-25 13:23:51.000000000 +0200 +*************** +*** 1413,1418 **** +--- 1413,1433 ---- + } + + STARTTEST ++ :set cino& ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ for (int i = 0; i < 10; ++i) ++ if (i & 1) { ++ foo(1); ++ } else ++ foo(0); ++ baz(); ++ } ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../mercurial/vim73/src/testdir/test3.ok 2011-05-19 16:35:05.000000000 +0200 +--- src/testdir/test3.ok 2011-05-25 13:23:51.000000000 +0200 +*************** +*** 1262,1264 **** +--- 1262,1275 ---- + foo(); + } + ++ ++ void func(void) ++ { ++ for (int i = 0; i < 10; ++i) ++ if (i & 1) { ++ foo(1); ++ } else ++ foo(0); ++ baz(); ++ } ++ +*** ../vim-7.3.200/src/version.c 2011-05-25 12:51:17.000000000 +0200 +--- src/version.c 2011-05-25 13:33:16.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 201, + /**/ + +-- +Laughing helps. It's like jogging on the inside. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.202 b/source/ap/vim/patches/7.3.202 new file mode 100644 index 000000000..1289e0851 --- /dev/null +++ b/source/ap/vim/patches/7.3.202 @@ -0,0 +1,868 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.202 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.202 +Problem: Cannot influence the indent inside a namespace. +Solution: Add the "N" 'cino' parameter. (Konstantin Lepa) +Files: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, + src/testdir/test3.ok + + +*** ../mercurial/vim73/runtime/doc/indent.txt 2011-04-28 19:01:26.000000000 +0200 +--- runtime/doc/indent.txt 2011-05-25 14:35:37.000000000 +0200 +*************** +*** 128,140 **** + used CTRL-T or CTRL-D. + + *cinoptions-values* +! The 'cinoptions' option sets how Vim performs indentation. In the list below, + "N" represents a number of your choice (the number can be negative). When + there is an 's' after the number, Vim multiplies the number by 'shiftwidth': + "1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a +! decimal point, too: "-0.5s" is minus half a 'shiftwidth'. The examples below +! assume a 'shiftwidth' of 4. +! + >N Amount added for "normal" indent. Used after a line that should + increase the indent (lines starting with "if", an opening brace, + etc.). (default 'shiftwidth'). +--- 128,147 ---- + used CTRL-T or CTRL-D. + + *cinoptions-values* +! The 'cinoptions' option sets how Vim performs indentation. The value after +! the option character can be one of these (N is any number): +! N indent N spaces +! -N indent N spaces to the left +! Ns N times 'shiftwidth spaces +! -Ns N times 'shiftwidth spaces to the left +! +! In the list below, + "N" represents a number of your choice (the number can be negative). When + there is an 's' after the number, Vim multiplies the number by 'shiftwidth': + "1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a +! decimal point, too: "-0.5s" is minus half a 'shiftwidth'. +! The examples below assume a 'shiftwidth' of 4. +! *cino->* + >N Amount added for "normal" indent. Used after a line that should + increase the indent (lines starting with "if", an opening brace, + etc.). (default 'shiftwidth'). +*************** +*** 145,150 **** +--- 152,158 ---- + foo; foo; foo; + } } } + < ++ *cino-e* + eN Add N to the prevailing indent inside a set of braces if the + opening brace at the End of the line (more precise: is not the + first character in a line). This is useful if you want a +*************** +*** 160,165 **** +--- 168,174 ---- + bar; bar; bar; + } } } + < ++ *cino-n* + nN Add N to the prevailing indent for a statement after an "if", + "while", etc., if it is NOT inside a set of braces. This is + useful if you want a different indent when there is no '{' +*************** +*** 174,179 **** +--- 183,189 ---- + bar; bar; bar; + } } } + < ++ *cino-f* + fN Place the first opening brace of a function or other block in + column N. This applies only for an opening brace that is not + inside other braces and is at the start of the line. What comes +*************** +*** 184,189 **** +--- 194,200 ---- + { { { + int foo; int foo; int foo; + < ++ *cino-{* + {N Place opening braces N characters from the prevailing indent. + This applies only for opening braces that are inside other + braces. (default 0). +*************** +*** 193,198 **** +--- 204,210 ---- + { { { + foo; foo; foo; + < ++ *cino-}* + }N Place closing braces N characters from the matching opening + brace. (default 0). + +*************** +*** 202,207 **** +--- 214,220 ---- + foo; foo; foo; + } } } + < ++ *cino-^* + ^N Add N to the prevailing indent inside a set of braces if the + opening brace is in column 0. This can specify a different + indent for whole of a function (some may like to set it to a +*************** +*** 216,221 **** +--- 229,235 ---- + } } } + } } } + < ++ *cino-L* + LN Controls placement of jump labels. If N is negative, the label + will be placed at column 1. If N is non-negative, the indent of + the label will be the prevailing indent minus N. (default -1). +*************** +*** 229,234 **** +--- 243,249 ---- + } } } + } } } + < ++ *cino-:* + :N Place case labels N characters from the indent of the switch(). + (default 'shiftwidth'). + +*************** +*** 240,245 **** +--- 255,261 ---- + default: default: + } } + < ++ *cino-=* + =N Place statements occurring after a case label N characters from + the indent of the label. (default 'shiftwidth'). + +*************** +*** 247,252 **** +--- 263,269 ---- + case 11: case 11: a = a + 1; + a = a + 1; b = b + 1; + < ++ *cino-l* + lN If N != 0 Vim will align with a case label instead of the + statement after it in the same line. + +*************** +*** 256,261 **** +--- 273,279 ---- + break; break; + } } + < ++ *cino-b* + bN If N != 0 Vim will align a final "break" with the case label, + so that case..break looks like a sort of block. (default: 0). + When using 1, consider adding "0=break" to 'cinkeys'. +*************** +*** 272,277 **** +--- 290,296 ---- + break; break; + } } + < ++ *cino-g* + gN Place C++ scope declarations N characters from the indent of the + block they are in. (default 'shiftwidth'). A scope declaration + can be "public:", "protected:" or "private:". +*************** +*** 283,288 **** +--- 302,308 ---- + private: private: + } } + < ++ *cino-h* + hN Place statements occurring after a C++ scope declaration N + characters from the indent of the label. (default + 'shiftwidth'). +*************** +*** 291,296 **** +--- 311,331 ---- + public: public: a = a + 1; + a = a + 1; b = b + 1; + < ++ *cino-N* ++ NN Indent inside C++ namespace N characters extra compared to a ++ normal block. (default 0). ++ ++ cino= cino=N-s > ++ namespace { namespace { ++ void function(); void function(); ++ } } ++ ++ namespace my namespace my ++ { { ++ void function(); void function(); ++ } } ++ < ++ *cino-p* + pN Parameter declarations for K&R-style function declarations will + be indented N characters from the margin. (default + 'shiftwidth'). +*************** +*** 300,305 **** +--- 335,341 ---- + int a; int a; int a; + char b; char b; char b; + < ++ *cino-t* + tN Indent a function return type declaration N characters from the + margin. (default 'shiftwidth'). + +*************** +*** 307,312 **** +--- 343,349 ---- + int int int + func() func() func() + < ++ *cino-i* + iN Indent C++ base class declarations and constructor + initializations, if they start in a new line (otherwise they + are aligned at the right side of the ':'). +*************** +*** 330,335 **** +--- 368,374 ---- + a = b + 9 * a = b + 9 * + c; c; + < ++ *cino-c* + cN Indent comment lines after the comment opener, when there is no + other text with which to align, N characters from the comment + opener. (default 3). See also |format-comments|. +*************** +*** 339,344 **** +--- 378,384 ---- + text. text. + */ */ + < ++ *cino-C* + CN When N is non-zero, indent comment lines by the amount specified + with the c flag above even if there is other text behind the + comment opener. (default 0). +*************** +*** 349,360 **** +--- 389,402 ---- + ********/ ********/ + < (Example uses ":set comments& comments-=s1:/* comments^=s0:/*") + ++ *cino-/* + /N Indent comment lines N characters extra. (default 0). + cino= cino=/4 > + a = b; a = b; + /* comment */ /* comment */ + c = d; c = d; + < ++ *cino-(* + (N When in unclosed parentheses, indent N characters from the line + with the unclosed parentheses. Add a 'shiftwidth' for every + unclosed parentheses. When N is 0 or the unclosed parentheses +*************** +*** 370,375 **** +--- 412,418 ---- + (c2 || c3)) (c2 || c3)) + { { + < ++ *cino-u* + uN Same as (N, but for one level deeper. (default 'shiftwidth'). + + cino= cino=u2 > +*************** +*** 377,382 **** +--- 420,426 ---- + && (c22345 && (c22345 + || c3)) || c3)) + < ++ *cino-U* + UN When N is non-zero, do not ignore the indenting specified by + ( or u in case that the unclosed parentheses is the first + non-white character in its line. (default 0). +*************** +*** 388,393 **** +--- 432,438 ---- + c3 c3 + ) && c4; ) && c4; + < ++ *cino-2* + wN When in unclosed parentheses and N is non-zero and either + using "(0" or "u0", respectively, or using "U0" and the unclosed + parentheses is the first non-white character in its line, line +*************** +*** 400,405 **** +--- 445,451 ---- + || c3)) || c3)) + foo; foo; + < ++ *cino-W* + WN When in unclosed parentheses and N is non-zero and either + using "(0" or "u0", respectively and the unclosed parentheses is + the last non-white character in its line and it is not the +*************** +*** 414,419 **** +--- 460,466 ---- + a_short_line(argument, a_short_line(argument, + argument); argument); + < ++ *cino-m* + mN When N is non-zero, line up a line starting with a closing + parentheses with the first character of the line with the + matching opening parentheses. (default 0). +*************** +*** 428,433 **** +--- 475,481 ---- + ) ) + foo; foo; + < ++ *cino-M* + MN When N is non-zero, line up a line starting with a closing + parentheses with the first character of the previous line. + (default 0). +*************** +*** 437,443 **** + cond2 cond2 + ) ) + < +! *java-cinoptions* *java-indenting* + jN Indent java anonymous classes correctly. The value 'N' is + currently unused but must be non-zero (e.g. 'j1'). 'j1' will + indent for example the following code snippet correctly: > +--- 485,491 ---- + cond2 cond2 + ) ) + < +! *java-cinoptions* *java-indenting* *cino-j* + jN Indent java anonymous classes correctly. The value 'N' is + currently unused but must be non-zero (e.g. 'j1'). 'j1' will + indent for example the following code snippet correctly: > +*************** +*** 448,454 **** + } + }); + < +! *javascript-cinoptions* *javascript-indenting* + JN Indent JavaScript object declarations correctly by not confusing + them with labels. The value 'N' is currently unused but must be + non-zero (e.g. 'J1'). > +--- 496,502 ---- + } + }); + < +! *javascript-cinoptions* *javascript-indenting* *cino-J* + JN Indent JavaScript object declarations correctly by not confusing + them with labels. The value 'N' is currently unused but must be + non-zero (e.g. 'J1'). > +*************** +*** 483,489 **** + + + The defaults, spelled out in full, are: +! cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,ps,ts,is,+s, + c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0 + + Vim puts a line in column 1 if: +--- 534,540 ---- + + + The defaults, spelled out in full, are: +! cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s, + c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0 + + Vim puts a line in column 1 if: +*** ../mercurial/vim73/src/misc1.c 2011-05-25 13:33:59.000000000 +0200 +--- src/misc1.c 2011-05-25 14:57:31.000000000 +0200 +*************** +*** 4959,4964 **** +--- 4959,4965 ---- + static int corr_ind_maxparen __ARGS((int ind_maxparen, pos_T *startpos)); + static int find_last_paren __ARGS((char_u *l, int start, int end)); + static int find_match __ARGS((int lookfor, linenr_T ourscope, int ind_maxparen, int ind_maxcomment)); ++ static int cin_is_cpp_namespace __ARGS((char_u *)); + + static int ind_hash_comment = 0; /* # starts a comment */ + +*************** +*** 5221,5226 **** +--- 5222,5271 ---- + return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':'); + } + ++ /* Maximum number of lines to search back for a "namespace" line. */ ++ #define FIND_NAMESPACE_LIM 20 ++ ++ /* ++ * Recognize a "namespace" scope declaration. ++ */ ++ static int ++ cin_is_cpp_namespace(s) ++ char_u *s; ++ { ++ char_u *p; ++ int has_name = FALSE; ++ ++ s = cin_skipcomment(s); ++ if (STRNCMP(s, "namespace", 9) == 0 && (s[9] == NUL || !vim_iswordc(s[9]))) ++ { ++ p = cin_skipcomment(skipwhite(s + 9)); ++ while (*p != NUL) ++ { ++ if (vim_iswhite(*p)) ++ { ++ has_name = TRUE; /* found end of a name */ ++ p = cin_skipcomment(skipwhite(p)); ++ } ++ else if (*p == '{') ++ { ++ break; ++ } ++ else if (vim_iswordc(*p)) ++ { ++ if (has_name) ++ return FALSE; /* word character after skipping past name */ ++ ++p; ++ } ++ else ++ { ++ return FALSE; ++ } ++ } ++ return TRUE; ++ } ++ return FALSE; ++ } ++ + /* + * Return a pointer to the first non-empty non-comment character after a ':'. + * Return NULL if not found. +*************** +*** 6296,6301 **** +--- 6341,6351 ---- + */ + int ind_keep_case_label = 0; + ++ /* ++ * handle C++ namespace ++ */ ++ int ind_cpp_namespace = 0; ++ + pos_T cur_curpos; + int amount; + int scope_amount; +*************** +*** 6336,6341 **** +--- 6386,6392 ---- + int n; + int iscase; + int lookfor_break; ++ int lookfor_cpp_namespace = FALSE; + int cont_amount = 0; /* amount for continuation line */ + int original_line_islabel; + +*************** +*** 6409,6414 **** +--- 6460,6466 ---- + case 'J': ind_js = n; break; + case 'l': ind_keep_case_label = n; break; + case '#': ind_hash_comment = n; break; ++ case 'N': ind_cpp_namespace = n; break; + } + if (*options == ',') + ++options; +*************** +*** 6976,6986 **** +--- 7028,7051 ---- + if (start_brace == BRACE_IN_COL0) /* '{' is in column 0 */ + { + amount = ind_open_left_imag; ++ lookfor_cpp_namespace = TRUE; ++ } ++ else if (start_brace == BRACE_AT_START && ++ lookfor_cpp_namespace) /* '{' is at start */ ++ { ++ ++ lookfor_cpp_namespace = TRUE; + } + else + { + if (start_brace == BRACE_AT_END) /* '{' is at end of line */ ++ { + amount += ind_open_imag; ++ ++ l = skipwhite(ml_get_curline()); ++ if (cin_is_cpp_namespace(l)) ++ amount += ind_cpp_namespace; ++ } + else + { + /* Compensate for adding ind_open_extra later. */ +*************** +*** 7151,7156 **** +--- 7216,7261 ---- + else + amount += ind_continuation; + } ++ else if (lookfor_cpp_namespace) ++ { ++ if (curwin->w_cursor.lnum == ourscope) ++ continue; ++ ++ if (curwin->w_cursor.lnum == 0 ++ || curwin->w_cursor.lnum ++ < ourscope - FIND_NAMESPACE_LIM) ++ break; ++ ++ l = ml_get_curline(); ++ ++ /* ++ * If we're in a comment now, skip to the start of the ++ * comment. ++ */ ++ trypos = find_start_comment(ind_maxcomment); ++ if (trypos != NULL) ++ { ++ curwin->w_cursor.lnum = trypos->lnum + 1; ++ curwin->w_cursor.col = 0; ++ continue; ++ } ++ ++ /* ++ * Skip preprocessor directives and blank lines. ++ */ ++ if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum)) ++ continue; ++ ++ if (cin_is_cpp_namespace(l)) ++ { ++ amount += ind_cpp_namespace; ++ break; ++ } ++ ++ if (cin_nocode(l)) ++ continue; ++ ++ } + else if (lookfor != LOOKFOR_TERM + && lookfor != LOOKFOR_CPP_BASECLASS) + { +*** ../mercurial/vim73/src/testdir/test3.in 2011-05-25 13:33:59.000000000 +0200 +--- src/testdir/test3.in 2011-05-25 14:47:31.000000000 +0200 +*************** +*** 799,804 **** +--- 799,867 ---- + df */ + hello + } ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ + /* end of AUTO */ + + STARTTEST +*************** +*** 1428,1433 **** +--- 1491,1566 ---- + } + + STARTTEST ++ :set cino=N-s ++ /namespaces ++ =/^NAMESPACEEND ++ ENDTEST ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ NAMESPACEEND ++ ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../mercurial/vim73/src/testdir/test3.ok 2011-05-25 13:33:59.000000000 +0200 +--- src/testdir/test3.ok 2011-05-25 14:48:02.000000000 +0200 +*************** +*** 787,792 **** +--- 787,855 ---- + df */ + hello + } ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ + /* end of AUTO */ + + +*************** +*** 1273,1275 **** +--- 1336,1403 ---- + baz(); + } + ++ ++ /* valid namespaces with normal indent */ ++ namespace ++ { ++ { ++ 111111111111; ++ } ++ } ++ namespace /* test */ ++ { ++ 11111111111111111; ++ } ++ namespace // test ++ { ++ 111111111111111111; ++ } ++ namespace ++ { ++ 111111111111111111; ++ } ++ namespace test ++ { ++ 111111111111111111; ++ } ++ namespace{ ++ 111111111111111111; ++ } ++ namespace test{ ++ 111111111111111111; ++ } ++ namespace { ++ 111111111111111111; ++ } ++ namespace test { ++ 111111111111111111; ++ namespace test2 { ++ 22222222222222222; ++ } ++ } ++ ++ /* invalid namespaces use block indent */ ++ namespace test test2 { ++ 111111111111111111111; ++ } ++ namespace11111111111 { ++ 111111111111; ++ } ++ namespace() { ++ 1111111111111; ++ } ++ namespace() ++ { ++ 111111111111111111; ++ } ++ namespace test test2 ++ { ++ 1111111111111111111; ++ } ++ namespace111111111 ++ { ++ 111111111111111111; ++ } ++ NAMESPACEEND ++ ++ +*** ../vim-7.3.201/src/version.c 2011-05-25 13:33:59.000000000 +0200 +--- src/version.c 2011-05-25 15:14:20.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 202, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +107. When using your phone you forget that you don't have to use your + keyboard. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.203 b/source/ap/vim/patches/7.3.203 new file mode 100644 index 000000000..62c298972 --- /dev/null +++ b/source/ap/vim/patches/7.3.203 @@ -0,0 +1,102 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.203 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.203 +Problem: MS-Windows: Can't run an external command without a console window. +Solution: Support ":!start /b cmd". (Xaizek) +Files: runtime/doc/os_win32.txt, src/os_win32.c + + +*** ../mercurial/vim73/src/os_win32.c 2011-05-05 18:31:54.000000000 +0200 +--- src/os_win32.c 2011-05-25 16:45:31.000000000 +0200 +*************** +*** 3401,3406 **** +--- 3401,3407 ---- + { + STARTUPINFO si; + PROCESS_INFORMATION pi; ++ DWORD flags = CREATE_NEW_CONSOLE; + + si.cb = sizeof(si); + si.lpReserved = NULL; +*************** +*** 3418,3423 **** +--- 3419,3440 ---- + si.dwFlags = STARTF_USESHOWWINDOW; + si.wShowWindow = SW_SHOWMINNOACTIVE; + } ++ else if ((STRNICMP(cmdbase, "/b", 2) == 0) ++ && vim_iswhite(cmdbase[2])) ++ { ++ cmdbase = skipwhite(cmdbase + 2); ++ flags = CREATE_NO_WINDOW; ++ si.dwFlags = STARTF_USESTDHANDLES; ++ si.hStdInput = CreateFile("\\\\.\\NUL", // File name ++ GENERIC_READ, // Access flags ++ 0, // Share flags ++ NULL, // Security att. ++ OPEN_EXISTING, // Open flags ++ FILE_ATTRIBUTE_NORMAL, // File att. ++ NULL); // Temp file ++ si.hStdOutput = si.hStdInput; ++ si.hStdError = si.hStdInput; ++ } + + /* When the command is in double quotes, but 'shellxquote' is + * empty, keep the double quotes around the command. +*************** +*** 3445,3451 **** + NULL, // Process security attributes + NULL, // Thread security attributes + FALSE, // Inherit handles +! CREATE_NEW_CONSOLE, // Creation flags + NULL, // Environment + NULL, // Current directory + &si, // Startup information +--- 3462,3468 ---- + NULL, // Process security attributes + NULL, // Thread security attributes + FALSE, // Inherit handles +! flags, // Creation flags + NULL, // Environment + NULL, // Current directory + &si, // Startup information +*************** +*** 3458,3463 **** +--- 3475,3485 ---- + EMSG(_("E371: Command not found")); + #endif + } ++ if (si.hStdInput != NULL) ++ { ++ /* Close the handle to \\.\NUL */ ++ CloseHandle(si.hStdInput); ++ } + /* Close the handles to the subprocess, so that it goes away */ + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); +*** ../vim-7.3.202/src/version.c 2011-05-25 15:16:06.000000000 +0200 +--- src/version.c 2011-05-25 17:05:59.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 203, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +108. While reading a magazine, you look for the Zoom icon for a better + look at a photograph. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.204 b/source/ap/vim/patches/7.3.204 new file mode 100644 index 000000000..b2b63602e --- /dev/null +++ b/source/ap/vim/patches/7.3.204 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.204 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.204 (after 7.3.201) +Problem: Compiler warning. +Solution: Add type cast. (Mike Williams) +Files: src/misc1.c + + +*** ../mercurial/vim73/src/misc1.c 2011-05-25 15:16:06.000000000 +0200 +--- src/misc1.c 2011-05-25 17:25:10.000000000 +0200 +*************** +*** 7657,7663 **** + * not the one from "if () {". */ + if (*l == '}') + curwin->w_cursor.col = +! (l - ml_get_curline()) + 1; + + if ((trypos = find_start_brace(ind_maxcomment)) + == NULL +--- 7657,7663 ---- + * not the one from "if () {". */ + if (*l == '}') + curwin->w_cursor.col = +! (colnr_T)(l - ml_get_curline()) + 1; + + if ((trypos = find_start_brace(ind_maxcomment)) + == NULL +*** ../vim-7.3.203/src/version.c 2011-05-25 17:06:16.000000000 +0200 +--- src/version.c 2011-05-25 17:29:32.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 204, + /**/ + +-- +In a world without walls and borders, who needs windows and gates? + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.205 b/source/ap/vim/patches/7.3.205 new file mode 100644 index 000000000..b49a040e4 --- /dev/null +++ b/source/ap/vim/patches/7.3.205 @@ -0,0 +1,93 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.205 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.205 +Problem: Syntax "extend" doesn't work correctly. +Solution: Avoid calling check_state_ends() recursively (Ben Schmidt) +Files: src/syntax.c + + +*** ../mercurial/vim73/src/syntax.c 2011-05-19 12:14:03.000000000 +0200 +--- src/syntax.c 2011-05-25 17:47:46.000000000 +0200 +*************** +*** 990,996 **** +--- 990,999 ---- + * previous line and regions that have "keepend". + */ + if (current_state.ga_len > 0) ++ { + syn_update_ends(TRUE); ++ check_state_ends(); ++ } + + next_match_idx = -1; + ++current_line_id; +*************** +*** 1064,1070 **** + } + } + check_keepend(); +- check_state_ends(); + } + + /**************************************** +--- 1067,1072 ---- +*************** +*** 2533,2539 **** + check_state_ends() + { + stateitem_T *cur_si; +! int had_extend = FALSE; + + cur_si = &CUR_STATE(current_state.ga_len - 1); + for (;;) +--- 2535,2541 ---- + check_state_ends() + { + stateitem_T *cur_si; +! int had_extend; + + cur_si = &CUR_STATE(current_state.ga_len - 1); + for (;;) +*************** +*** 2586,2593 **** + + /* When the ended item has "extend", another item with + * "keepend" now needs to check for its end. */ +! if (cur_si->si_flags & HL_EXTEND) +! had_extend = TRUE; + + pop_current_state(); + +--- 2588,2594 ---- + + /* When the ended item has "extend", another item with + * "keepend" now needs to check for its end. */ +! had_extend = (cur_si->si_flags & HL_EXTEND); + + pop_current_state(); + +*** ../vim-7.3.204/src/version.c 2011-05-25 17:29:40.000000000 +0200 +--- src/version.c 2011-05-25 17:52:57.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 205, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +110. You actually volunteer to become your employer's webmaster. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.206 b/source/ap/vim/patches/7.3.206 new file mode 100644 index 000000000..8a91f0ae2 --- /dev/null +++ b/source/ap/vim/patches/7.3.206 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.206 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.206 +Problem: 64bit MS-Windows compiler warning. +Solution: Use HandleToLong() instead of type cast. (Mike Williams) +Files: src/gui_w32.c + + +*** ../mercurial/vim73/src/gui_w32.c 2011-01-17 20:08:04.000000000 +0100 +--- src/gui_w32.c 2011-05-25 21:14:10.000000000 +0200 +*************** +*** 1575,1581 **** + + #ifdef FEAT_EVAL + /* set the v:windowid variable */ +! set_vim_var_nr(VV_WINDOWID, (long)s_hwnd); + #endif + + theend: +--- 1575,1581 ---- + + #ifdef FEAT_EVAL + /* set the v:windowid variable */ +! set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd)); + #endif + + theend: +*** ../vim-7.3.205/src/version.c 2011-05-25 17:56:23.000000000 +0200 +--- src/version.c 2011-05-25 21:16:17.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 206, + /**/ + +-- +FIXME and XXX are two common keywords used to mark broken or incomplete code +not only since XXX as a sex reference would grab everybody's attention but +simply due to the fact that Vim would highlight these words. + -- Hendrik Scholz + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.207 b/source/ap/vim/patches/7.3.207 new file mode 100644 index 000000000..95b335ecc --- /dev/null +++ b/source/ap/vim/patches/7.3.207 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.207 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.207 +Problem: Can't compile with MSVC with pentium4 and 64 bit. +Solution: Only use SSE2 for 32 bit. (Mike Williams) +Files: src/Make_mvc.mak + + +*** ../mercurial/vim73/src/Make_mvc.mak 2011-02-15 18:06:11.000000000 +0100 +--- src/Make_mvc.mak 2011-06-04 11:59:38.000000000 +0200 +*************** +*** 409,416 **** + CPUARG = + !endif + !else +! # VC8/9 only allows specifying SSE architecture +! !if "$(CPUNR)" == "pentium4" + CPUARG = /arch:SSE2 + !endif + !endif +--- 409,416 ---- + CPUARG = + !endif + !else +! # VC8/9/10 only allows specifying SSE architecture but only for 32bit +! !if "$(ASSEMBLY_ARCHITECTURE)" == "x86" && "$(CPUNR)" == "pentium4" + CPUARG = /arch:SSE2 + !endif + !endif +*** ../vim-7.3.206/src/version.c 2011-05-25 21:18:02.000000000 +0200 +--- src/version.c 2011-06-12 20:30:30.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 207, + /**/ + +-- +"The question of whether computers can think is just like the question +of whether submarines can swim." -- Edsger W. Dijkstra + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.208 b/source/ap/vim/patches/7.3.208 new file mode 100644 index 000000000..c5a792957 --- /dev/null +++ b/source/ap/vim/patches/7.3.208 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.208 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.208 +Problem: Early terminated if statement. +Solution: Remove the semicolon. (Lech Lorens) +Files: src/gui_mac.c + + +*** ../mercurial/vim73/src/gui_mac.c 2011-01-17 20:08:04.000000000 +0100 +--- src/gui_mac.c 2011-06-06 05:35:46.000000000 +0200 +*************** +*** 1840,1846 **** + p.v -= gui.scrollbar_height; + p.v -= p.v % gui.char_height; + p.v += 2 * gui.border_width; +! if (gui.which_scrollbars[SBAR_BOTTOM]); + p.v += gui.scrollbar_height; + + ZoomWindowIdeal(whichWindow, thePart, &p); +--- 1840,1846 ---- + p.v -= gui.scrollbar_height; + p.v -= p.v % gui.char_height; + p.v += 2 * gui.border_width; +! if (gui.which_scrollbars[SBAR_BOTTOM]) + p.v += gui.scrollbar_height; + + ZoomWindowIdeal(whichWindow, thePart, &p); +*** ../vim-7.3.207/src/version.c 2011-06-12 20:31:25.000000000 +0200 +--- src/version.c 2011-06-12 20:33:00.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 208, + /**/ + +-- +Keep America beautiful. Swallow your beer cans. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.209 b/source/ap/vim/patches/7.3.209 new file mode 100644 index 000000000..afd4ab825 --- /dev/null +++ b/source/ap/vim/patches/7.3.209 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.209 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.209 +Problem: MSVC Install instructions point to wrong batch file. +Solution: Add a batch file for use with MSVC 10. +Files: src/msvc2010.bat, src/INSTALLpc.txt, Filelist + + +*** ../mercurial/vim73/src/msvc2010.bat 2011-06-12 20:35:31.000000000 +0200 +--- src/msvc2010.bat 2011-06-09 05:08:35.000000000 +0200 +*************** +*** 0 **** +--- 1,7 ---- ++ @echo off ++ rem To be used on MS-Windows for Visual C++ 2010 Express Edition ++ rem aka Microsoft Visual Studio 10.0. ++ rem See INSTALLpc.txt for information. ++ @echo on ++ ++ call "%VS100COMNTOOLS%%vsvars32.bat" +*** ../mercurial/vim73/src/INSTALLpc.txt 2010-08-16 21:23:30.000000000 +0200 +--- src/INSTALLpc.txt 2011-06-08 06:47:46.000000000 +0200 +*************** +*** 28,35 **** + 9. MS-DOS + + The currently preferred method is using the free Visual C++ Toolkit 2008 +! |msvc-2008-express|. If you need the executable to run on Windows 98 or ME, +! use the 2003 one |msvc-2003-toolkit|. + + + 1. Microsoft Visual C++ +--- 28,36 ---- + 9. MS-DOS + + The currently preferred method is using the free Visual C++ Toolkit 2008 +! |msvc-2008-express|, the produced binary runs on most MS-Windows systems. If +! you need the executable to run on Windows 98 or ME, use the 2003 one +! |msvc-2003-toolkit|. + + + 1. Microsoft Visual C++ +*************** +*** 176,182 **** + http://www.microsoft.com/express/vc/Default.aspx + This includes the IDE and the debugger. + +! To set the environment execute the msvc2008.bat script. You can then build + Vim with Make_mvc.mak. + + +--- 177,183 ---- + http://www.microsoft.com/express/vc/Default.aspx + This includes the IDE and the debugger. + +! To set the environment execute the msvc2010.bat script. You can then build + Vim with Make_mvc.mak. + + +*** ../mercurial/vim73/Filelist 2011-05-19 13:40:47.000000000 +0200 +--- Filelist 2011-06-09 05:17:25.000000000 +0200 +*************** +*** 262,267 **** +--- 262,268 ---- + src/bigvim.bat \ + src/msvcsetup.bat \ + src/msvc2008.bat \ ++ src/msvc2010.bat \ + src/dimm.idl \ + src/dlldata.c \ + src/dosinst.c \ +*** ../vim-7.3.208/src/version.c 2011-06-12 20:33:30.000000000 +0200 +--- src/version.c 2011-06-12 20:34:44.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 209, + /**/ + +-- +"Hit any key to continue" is a lie. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.210 b/source/ap/vim/patches/7.3.210 new file mode 100644 index 000000000..f02fe6fe6 --- /dev/null +++ b/source/ap/vim/patches/7.3.210 @@ -0,0 +1,182 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.210 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.210 +Problem: Can't always find the file when using cscope. +Solution: Add the 'cscoperelative' option. (Raghavendra D Prabhu) +Files: runtime/doc/if_cscop.txt, runtime/doc/options.txt, + src/if_cscope.c, src/options.c, src/options.h + + +*** ../mercurial/vim73/runtime/doc/if_cscop.txt 2010-09-30 21:38:08.000000000 +0200 +--- runtime/doc/if_cscop.txt 2011-06-12 19:54:26.000000000 +0200 +*************** +*** 271,276 **** +--- 271,285 ---- + :set cst + :set nocst + < ++ *cscoperelative* *csre* ++ If 'cscoperelative' set, then in absence of a prefix given to cscope (prefx ++ is the argument to -P option of cscope), basename of cscope.out location ++ (usually the project root directory) will be used as the prefix to construt ++ absolute path.The default is off. Note: This option is only effective when ++ cscope (cscopeprg) is initialized without a prefix path (-P). Examples: > ++ :set csre ++ :set nocsre ++ < + *cscopetagorder* *csto* + The value of 'csto' determines the order in which |:cstag| performs a search. + If 'csto' is set to zero, cscope database(s) are searched first, followed +*** ../mercurial/vim73/runtime/doc/options.txt 2011-05-19 12:22:41.000000000 +0200 +--- runtime/doc/options.txt 2011-06-12 20:00:10.000000000 +0200 +*************** +*** 2209,2214 **** +--- 2209,2224 ---- + Specifies whether to use quickfix window to show cscope results. + See |cscopequickfix|. + ++ *'cscoperelative'* *'csre'* ++ 'cscoperelative' 'csre' boolean (default off) ++ global ++ {not available when compiled without the |+cscope| ++ feature} ++ {not in Vi} ++ In the absence of a prefix (-P) for cscope. setting this option enables ++ to use the basename of cscope.out path as the prefix. ++ See |cscoperelative|. ++ + *'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'* + 'cscopetag' 'cst' boolean (default off) + global +*** ../mercurial/vim73/src/if_cscope.c 2011-05-05 16:41:19.000000000 +0200 +--- src/if_cscope.c 2011-06-12 20:25:17.000000000 +0200 +*************** +*** 2471,2512 **** + */ + static char * + cs_resolve_file(i, name) +! int i; + char *name; + { +! char *fullname; +! int len; + + /* +! * ppath is freed when we destroy the cscope connection. +! * fullname is freed after cs_make_vim_style_matches, after it's been +! * copied into the tag buffer used by vim + */ + len = (int)(strlen(name) + 2); + if (csinfo[i].ppath != NULL) + len += (int)strlen(csinfo[i].ppath); + + if ((fullname = (char *)alloc(len)) == NULL) + return NULL; + +! /* +! * note/example: this won't work if the cscope output already starts + * "../.." and the prefix path is also "../..". if something like this +! * happens, you are screwed up and need to fix how you're using cscope. +! */ +! if (csinfo[i].ppath != NULL && +! (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0) && +! (name[0] != '/') + #ifdef WIN32 +! && name[0] != '\\' && name[1] != ':' + #endif +! ) + (void)sprintf(fullname, "%s/%s", csinfo[i].ppath, name); + else + (void)sprintf(fullname, "%s", name); + + return fullname; +! } /* cs_resolve_file */ + + + /* +--- 2471,2531 ---- + */ + static char * + cs_resolve_file(i, name) +! int i; + char *name; + { +! char *fullname; +! int len; +! char_u *csdir = NULL; + + /* +! * Ppath is freed when we destroy the cscope connection. +! * Fullname is freed after cs_make_vim_style_matches, after it's been +! * copied into the tag buffer used by Vim. + */ + len = (int)(strlen(name) + 2); + if (csinfo[i].ppath != NULL) + len += (int)strlen(csinfo[i].ppath); ++ else if (p_csre && csinfo[i].fname != NULL) ++ { ++ /* If 'cscoperelative' is set and ppath is not set, use cscope.out ++ * path in path resolution. */ ++ csdir = alloc(MAXPATHL); ++ if (csdir != NULL) ++ { ++ vim_strncpy(csdir, (char_u *)csinfo[i].fname, ++ gettail((char_u *)csinfo[i].fname) - 1 - (char_u *)csinfo[i].fname); ++ len += (int)STRLEN(csdir); ++ } ++ } + + if ((fullname = (char *)alloc(len)) == NULL) + return NULL; + +! /* Note/example: this won't work if the cscope output already starts + * "../.." and the prefix path is also "../..". if something like this +! * happens, you are screwed up and need to fix how you're using cscope. */ +! if (csinfo[i].ppath != NULL +! && (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0) +! && (name[0] != '/') + #ifdef WIN32 +! && name[0] != '\\' && name[1] != ':' + #endif +! ) + (void)sprintf(fullname, "%s/%s", csinfo[i].ppath, name); ++ else if (csdir != NULL && csinfo[i].fname != NULL && STRLEN(csdir) > 0) ++ { ++ /* Check for csdir to be non empty to avoid empty path concatenated to ++ * cscope output. TODO: avoid the unnecessary alloc/free of fullname. */ ++ vim_free(fullname); ++ fullname = concat_fnames(csdir, (char_u *)name, TRUE); ++ } + else + (void)sprintf(fullname, "%s", name); + ++ vim_free(csdir); + return fullname; +! } + + + /* +*** ../vim-7.3.209/src/version.c 2011-06-12 20:36:00.000000000 +0200 +--- src/version.c 2011-06-12 20:37:48.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 210, + /**/ + +-- +Apathy Error: Don't bother striking any key. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.211 b/source/ap/vim/patches/7.3.211 new file mode 100644 index 000000000..4760c106c --- /dev/null +++ b/source/ap/vim/patches/7.3.211 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.211 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.211 (after 7.3.210) +Problem: Compiler warning. +Solution: Add type cast. +Files: src/if_cscope.c + + +*** ../mercurial/vim73/src/if_cscope.c 2011-06-12 20:42:17.000000000 +0200 +--- src/if_cscope.c 2011-06-12 21:22:53.000000000 +0200 +*************** +*** 2518,2524 **** + /* Check for csdir to be non empty to avoid empty path concatenated to + * cscope output. TODO: avoid the unnecessary alloc/free of fullname. */ + vim_free(fullname); +! fullname = concat_fnames(csdir, (char_u *)name, TRUE); + } + else + (void)sprintf(fullname, "%s", name); +--- 2518,2524 ---- + /* Check for csdir to be non empty to avoid empty path concatenated to + * cscope output. TODO: avoid the unnecessary alloc/free of fullname. */ + vim_free(fullname); +! fullname = (char *)concat_fnames(csdir, (char_u *)name, TRUE); + } + else + (void)sprintf(fullname, "%s", name); +*** ../vim-7.3.210/src/version.c 2011-06-12 20:42:17.000000000 +0200 +--- src/version.c 2011-06-12 21:24:03.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 211, + /**/ + +-- +Did you ever see a "Hit any key to continue" message in a music piece? + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.212 b/source/ap/vim/patches/7.3.212 new file mode 100644 index 000000000..d5086db0a --- /dev/null +++ b/source/ap/vim/patches/7.3.212 @@ -0,0 +1,243 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.212 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.212 +Problem: With Python 3.2 ":py3" fails. +Solution: Move PyEval_InitThreads() to after Py_Initialize(). (Roland + Puntaier) Check abiflags in configure. (Andreas Behr) +Files: src/if_python3.c, src/auto/configure, src/configure.in + + +*** ../mercurial/vim73/src/if_python3.c 2011-02-25 15:18:46.000000000 +0100 +--- src/if_python3.c 2011-06-11 04:24:49.000000000 +0200 +*************** +*** 547,560 **** + Py_SetPythonHome(PYTHON3_HOME); + #endif + +- /* initialise threads */ +- PyEval_InitThreads(); +- + #if !defined(MACOS) || defined(MACOS_X_UNIX) + Py_Initialize(); + #else + PyMac_Initialize(); + #endif + + #ifdef DYNAMIC_PYTHON3 + get_py3_exceptions(); +--- 547,559 ---- + Py_SetPythonHome(PYTHON3_HOME); + #endif + + #if !defined(MACOS) || defined(MACOS_X_UNIX) + Py_Initialize(); + #else + PyMac_Initialize(); + #endif ++ /* initialise threads, must be after Py_Initialize() */ ++ PyEval_InitThreads(); + + #ifdef DYNAMIC_PYTHON3 + get_py3_exceptions(); +*** ../mercurial/vim73/src/auto/configure 2011-05-10 15:41:59.000000000 +0200 +--- src/auto/configure 2011-06-12 21:33:16.000000000 +0200 +*************** +*** 5505,5510 **** +--- 5505,5527 ---- + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5 + $as_echo "$vi_cv_var_python3_version" >&6; } + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5 ++ $as_echo_n "checking Python's abiflags... " >&6; } ++ if test "${vi_cv_var_python3_abiflags+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++ else ++ ++ vi_cv_var_python3_abiflags= ++ if ${vi_cv_path_python3} -c \ ++ "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)" ++ then ++ vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \ ++ "import sys; print(sys.abiflags)"` ++ fi ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5 ++ $as_echo "$vi_cv_var_python3_abiflags" >&6; } ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5 + $as_echo_n "checking Python's install prefix... " >&6; } + if test "${vi_cv_path_python3_pfx+set}" = set; then : +*************** +*** 5555,5563 **** + else + + vi_cv_path_python3_conf= + for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do + for subdir in lib64 lib share; do +! d="${path}/${subdir}/python${vi_cv_var_python3_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python3_conf="$d" + fi +--- 5572,5584 ---- + else + + vi_cv_path_python3_conf= ++ config_dir="config" ++ if test "${vi_cv_var_python3_abiflags}" != ""; then ++ config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" ++ fi + for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do + for subdir in lib64 lib share; do +! d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python3_conf="$d" + fi +*************** +*** 5592,5598 **** + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS} ${python3_LINKFORSHARED}" + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` + +--- 5613,5619 ---- + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` + +*************** +*** 5601,5609 **** + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +--- 5622,5630 ---- + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +*** ../mercurial/vim73/src/configure.in 2011-05-10 15:41:59.000000000 +0200 +--- src/configure.in 2011-06-12 21:31:18.000000000 +0200 +*************** +*** 992,997 **** +--- 992,1008 ---- + ${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'` + ]]) + ++ dnl -- get abiflags for python 3.2 or higher (PEP 3149) ++ AC_CACHE_CHECK(Python's abiflags,vi_cv_var_python3_abiflags, ++ [ ++ vi_cv_var_python3_abiflags= ++ if ${vi_cv_path_python3} -c \ ++ "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)" ++ then ++ vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \ ++ "import sys; print(sys.abiflags)"` ++ fi ]) ++ + dnl -- find where python3 thinks it was installed + AC_CACHE_CHECK(Python's install prefix,vi_cv_path_python3_pfx, + [ vi_cv_path_python3_pfx=` +*************** +*** 1021,1029 **** + AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python3_conf, + [ + vi_cv_path_python3_conf= + for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do + for subdir in lib64 lib share; do +! d="${path}/${subdir}/python${vi_cv_var_python3_version}/config" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python3_conf="$d" + fi +--- 1032,1044 ---- + AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python3_conf, + [ + vi_cv_path_python3_conf= ++ config_dir="config" ++ if test "${vi_cv_var_python3_abiflags}" != ""; then ++ config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" ++ fi + for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do + for subdir in lib64 lib share; do +! d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}" + if test -d "$d" && test -f "$d/config.c"; then + vi_cv_path_python3_conf="$d" + fi +*************** +*** 1055,1061 **** + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS} ${python3_LINKFORSHARED}" + dnl remove -ltermcap, it can conflict with an earlier -lncurses + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +--- 1070,1076 ---- + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" + vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" +! vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + dnl remove -ltermcap, it can conflict with an earlier -lncurses + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +*************** +*** 1063,1071 **** + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +--- 1078,1086 ---- + + PYTHON3_LIBS="${vi_cv_path_python3_plibs}" + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +*** ../vim-7.3.211/src/version.c 2011-06-12 21:24:56.000000000 +0200 +--- src/version.c 2011-06-12 21:35:31.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 212, + /**/ + +-- +In Joseph Heller's novel "Catch-22", the main character tries to get out of a +war by proving he is crazy. But the mere fact he wants to get out of the war +only shows he isn't crazy -- creating the original "Catch-22". + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.213 b/source/ap/vim/patches/7.3.213 new file mode 100644 index 000000000..d3ef325e1 --- /dev/null +++ b/source/ap/vim/patches/7.3.213 @@ -0,0 +1,142 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.213 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.213 +Problem: Javascript object literal is not indented correctly. +Solution: Make a special case for when "J1" is in 'cino'. (Luc Deschenaux) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../mercurial/vim73/src/misc1.c 2011-05-25 17:29:40.000000000 +0200 +--- src/misc1.c 2011-06-10 04:58:10.000000000 +0200 +*************** +*** 6965,6971 **** + * ldfd) { + * } + */ +! if ((ind_keep_case_label + && cin_iscase(skipwhite(ml_get_curline()), FALSE))) + amount = get_indent(); + else +--- 6965,6971 ---- + * ldfd) { + * } + */ +! if (ind_js || (ind_keep_case_label + && cin_iscase(skipwhite(ml_get_curline()), FALSE))) + amount = get_indent(); + else +*** ../mercurial/vim73/src/testdir/test3.in 2011-05-25 15:16:06.000000000 +0200 +--- src/testdir/test3.in 2011-06-12 21:44:12.000000000 +0200 +*************** +*** 1492,1501 **** + + STARTTEST + :set cino=N-s +! /namespaces + =/^NAMESPACEEND + ENDTEST + + /* valid namespaces with normal indent */ + namespace + { +--- 1492,1502 ---- + + STARTTEST + :set cino=N-s +! /^NAMESPACESTART + =/^NAMESPACEEND + ENDTEST + ++ NAMESPACESTART + /* valid namespaces with normal indent */ + namespace + { +*************** +*** 1561,1566 **** +--- 1562,1588 ---- + + + STARTTEST ++ :set cino=J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ var bar = { ++ foo: { ++ that: this, ++ some: ok, ++ }, ++ "bar":{ ++ a : 2, ++ b: "123abc", ++ x: 4, ++ "y": 5 ++ } ++ } ++ JSEND ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../mercurial/vim73/src/testdir/test3.ok 2011-05-25 15:16:06.000000000 +0200 +--- src/testdir/test3.ok 2011-06-12 21:44:26.000000000 +0200 +*************** +*** 1337,1342 **** +--- 1337,1343 ---- + } + + ++ NAMESPACESTART + /* valid namespaces with normal indent */ + namespace + { +*************** +*** 1401,1403 **** +--- 1402,1420 ---- + NAMESPACEEND + + ++ ++ JSSTART ++ var bar = { ++ foo: { ++ that: this, ++ some: ok, ++ }, ++ "bar":{ ++ a : 2, ++ b: "123abc", ++ x: 4, ++ "y": 5 ++ } ++ } ++ JSEND ++ +*** ../vim-7.3.212/src/version.c 2011-06-12 21:37:06.000000000 +0200 +--- src/version.c 2011-06-12 21:48:34.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 213, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +169. You hire a housekeeper for your home page. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.214 b/source/ap/vim/patches/7.3.214 new file mode 100644 index 000000000..a095bbc43 --- /dev/null +++ b/source/ap/vim/patches/7.3.214 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.214 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.214 +Problem: The text displayed by ":z-" isn't exactly like old Vi. +Solution: Add one to the start line number. (ChangZhuo Chen) +Files: src/ex_cmds.c + + +*** ../mercurial/vim73/src/ex_cmds.c 2011-05-19 14:30:07.000000000 +0200 +--- src/ex_cmds.c 2011-05-19 14:23:33.000000000 +0200 +*************** +*** 4097,4104 **** + switch (*kind) + { + case '-': +! start = lnum - bigness * (linenr_T)(x - kind); +! end = start + bigness; + curs = end; + break; + +--- 4097,4104 ---- + switch (*kind) + { + case '-': +! start = lnum - bigness * (linenr_T)(x - kind) + 1; +! end = start + bigness - 1; + curs = end; + break; + +*** ../vim-7.3.213/src/version.c 2011-06-12 21:51:01.000000000 +0200 +--- src/version.c 2011-06-12 22:02:20.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 214, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +170. You introduce your wife as "my_lady@home.wife" and refer to your + children as "forked processes." + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.215 b/source/ap/vim/patches/7.3.215 new file mode 100644 index 000000000..24d37fbfe --- /dev/null +++ b/source/ap/vim/patches/7.3.215 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.215 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.215 (after 7.3.210) +Problem: Wrong file names in previous patch. (Toothpik) +Solution: Include the option changes. +Files: src/option.c, src/option.h + + +*** ../mercurial/vim73/src/option.c 2011-05-19 13:40:47.000000000 +0200 +--- src/option.c 2011-06-12 19:58:17.000000000 +0200 +*************** +*** 901,906 **** +--- 901,913 ---- + {(char_u *)0L, (char_u *)0L} + #endif + SCRIPTID_INIT}, ++ {"cscoperelative", "csre", P_BOOL|P_VI_DEF|P_VIM, ++ #ifdef FEAT_CSCOPE ++ (char_u *)&p_csre, PV_NONE, ++ #else ++ (char_u *)NULL, PV_NONE, ++ #endif ++ {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, + {"cscopetag", "cst", P_BOOL|P_VI_DEF|P_VIM, + #ifdef FEAT_CSCOPE + (char_u *)&p_cst, PV_NONE, +*** ../mercurial/vim73/src/option.h 2011-05-19 13:40:47.000000000 +0200 +--- src/option.h 2011-06-12 19:58:49.000000000 +0200 +*************** +*** 391,396 **** +--- 391,397 ---- + EXTERN char_u *p_cpo; /* 'cpoptions' */ + #ifdef FEAT_CSCOPE + EXTERN char_u *p_csprg; /* 'cscopeprg' */ ++ EXTERN int p_csre; /* 'cscoperelative' */ + # ifdef FEAT_QUICKFIX + EXTERN char_u *p_csqf; /* 'cscopequickfix' */ + # define CSQF_CMDS "sgdctefi" +*** ../vim-7.3.214/src/version.c 2011-06-12 22:03:15.000000000 +0200 +--- src/version.c 2011-06-12 22:12:34.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 215, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +171. You invent another person and chat with yourself in empty chat rooms. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.216 b/source/ap/vim/patches/7.3.216 new file mode 100644 index 000000000..a52bc936b --- /dev/null +++ b/source/ap/vim/patches/7.3.216 @@ -0,0 +1,263 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.216 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.216 +Problem: When recovering a file a range of lines is missing. (Charles Jie) +Solution: Reset the index when advancing to the next pointer block. Add a + test to verify recovery works. +Files: src/memline.c, src/testdir/test78.in, src/testdir/test78.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + + +*** ../mercurial/vim73/src/memline.c 2011-05-10 16:41:13.000000000 +0200 +--- src/memline.c 2011-06-13 00:56:09.000000000 +0200 +*************** +*** 1507,1512 **** +--- 1507,1513 ---- + bnum = pp->pb_pointer[idx].pe_bnum; + line_count = pp->pb_pointer[idx].pe_line_count; + page_count = pp->pb_pointer[idx].pe_page_count; ++ idx = 0; + continue; + } + } +*** ../mercurial/vim73/src/testdir/test78.in 2011-06-13 01:05:54.000000000 +0200 +--- src/testdir/test78.in 2011-06-13 00:54:48.000000000 +0200 +*************** +*** 0 **** +--- 1,46 ---- ++ Inserts 10000 lines with text to fill the swap file with two levels of pointer ++ blocks. Then recovers from the swap file and checks all text is restored. ++ ++ We need about 10000 lines of 100 characters to get two levels of pointer ++ blocks. ++ ++ STARTTEST ++ :so small.vim ++ :set nocp fileformat=unix undolevels=-1 ++ :e! Xtest ++ ggdG ++ :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" ++ :let i = 1 ++ :let linecount = 10000 ++ :while i <= linecount | call append(i - 1, i . text) | let i += 1 | endwhile ++ :preserve ++ :" get the name of the swap file ++ :redir => swapname ++ :swapname ++ :redir END ++ :let swapname = substitute(swapname, '[[:blank:][:cntrl:]]*\(.\{-}\)[[:blank:][:cntrl:]]*$', '\1', '') ++ :" make a copy of the swap file in Xswap ++ :set bin ++ :exe 'sp ' . swapname ++ :w! Xswap ++ :echo swapname ++ :set nobin ++ :new ++ :only! ++ :bwipe! Xtest ++ :call rename('Xswap', swapname) ++ :recover Xtest ++ :call delete(swapname) ++ :new ++ :call append(0, 'recovery start') ++ :wincmd w ++ :let linedollar = line('$') ++ :if linedollar < linecount | exe 'wincmd w' | call append(line('$'), "expected " . linecount . " lines but found only " . linedollar) | exe 'wincmd w' | let linecount = linedollar | endif ++ :let i = 1 ++ :while i <= linecount | if getline(i) != i . text | exe 'wincmd w' | call append(line('$'), i . ' differs') | exe 'wincmd w' | endif | let i += 1 | endwhile ++ :q! ++ :call append(line('$'), 'recovery end') ++ :w! test.out ++ :qa! ++ ENDTEST ++ +*** ../mercurial/vim73/src/testdir/test78.ok 2011-06-13 01:05:54.000000000 +0200 +--- src/testdir/test78.ok 2011-06-13 00:25:05.000000000 +0200 +*************** +*** 0 **** +--- 1,3 ---- ++ recovery start ++ ++ recovery end +*** ../mercurial/vim73/src/testdir/Makefile 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Makefile 2011-06-13 00:35:46.000000000 +0200 +*************** +*** 25,31 **** + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS_GUI = test16.out + +--- 25,31 ---- + test59.out test60.out test61.out test62.out test63.out \ + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out test78.out + + SCRIPTS_GUI = test16.out + +*************** +*** 71,77 **** + fi \ + else echo $* NO OUTPUT >>test.log; \ + fi" +! # -rm -rf X* test.ok viminfo + + test49.out: test49.vim + +--- 71,77 ---- + fi \ + else echo $* NO OUTPUT >>test.log; \ + fi" +! -rm -rf X* test.ok viminfo + + test49.out: test49.vim + +*** ../mercurial/vim73/src/testdir/Make_amiga.mak 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Make_amiga.mak 2011-06-13 01:00:42.000000000 +0200 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out + + .SUFFIXES: .in .out + +--- 28,34 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out + + .SUFFIXES: .in .out + +*************** +*** 125,127 **** +--- 125,128 ---- + test75.out: test75.in + test76.out: test76.in + test77.out: test77.in ++ test78.out: test78.in +*** ../mercurial/vim73/src/testdir/Make_dos.mak 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Make_dos.mak 2011-06-13 01:00:55.000000000 +0200 +*************** +*** 28,34 **** + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS32 = test50.out test70.out + +--- 28,34 ---- + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out test78.out + + SCRIPTS32 = test50.out test70.out + +*** ../mercurial/vim73/src/testdir/Make_ming.mak 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Make_ming.mak 2011-06-13 01:01:02.000000000 +0200 +*************** +*** 48,54 **** + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out + + SCRIPTS32 = test50.out test70.out + +--- 48,54 ---- + test37.out test38.out test39.out test40.out test41.out \ + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ +! test74.out test75.out test76.out test77.out test78.out + + SCRIPTS32 = test50.out test70.out + +*** ../mercurial/vim73/src/testdir/Make_os2.mak 2011-03-22 18:10:34.000000000 +0100 +--- src/testdir/Make_os2.mak 2011-06-13 01:01:08.000000000 +0200 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out + + .SUFFIXES: .in .out + +--- 28,34 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out + + .SUFFIXES: .in .out + +*** ../mercurial/vim73/src/testdir/Make_vms.mms 2011-04-28 19:05:01.000000000 +0200 +--- src/testdir/Make_vms.mms 2011-06-13 01:01:29.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Mar 03 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jun 13 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 75,81 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 75,81 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.215/src/version.c 2011-06-12 22:13:37.000000000 +0200 +--- src/version.c 2011-06-13 00:59:02.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 216, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +172. You join listservers just for the extra e-mail. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.217 b/source/ap/vim/patches/7.3.217 new file mode 100644 index 000000000..be04b8634 --- /dev/null +++ b/source/ap/vim/patches/7.3.217 @@ -0,0 +1,63 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.217 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.217 +Problem: Inside an "if" a ":wincmd" causes problems. +Solution: When skipping commands let ":wincmd" skip over its argument. +Files: src/ex_docmd.c + + +*** ../mercurial/vim73/src/ex_docmd.c 2011-05-25 12:51:17.000000000 +0200 +--- src/ex_docmd.c 2011-06-13 01:15:17.000000000 +0200 +*************** +*** 2595,2600 **** +--- 2595,2601 ---- + case CMD_unlet: + case CMD_verbose: + case CMD_vertical: ++ case CMD_wincmd: + break; + + default: goto doend; +*************** +*** 8237,8243 **** + p = skipwhite(p); + if (*p != NUL && *p != '"' && eap->nextcmd == NULL) + EMSG(_(e_invarg)); +! else + { + /* Pass flags on for ":vertical wincmd ]". */ + postponed_split_flags = cmdmod.split; +--- 8238,8244 ---- + p = skipwhite(p); + if (*p != NUL && *p != '"' && eap->nextcmd == NULL) + EMSG(_(e_invarg)); +! else if (!eap->skip) + { + /* Pass flags on for ":vertical wincmd ]". */ + postponed_split_flags = cmdmod.split; +*** ../vim-7.3.216/src/version.c 2011-06-13 01:07:22.000000000 +0200 +--- src/version.c 2011-06-13 01:18:48.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 217, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +173. You keep tracking down the email addresses of all your friends + (even childhood friends). + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.218 b/source/ap/vim/patches/7.3.218 new file mode 100644 index 000000000..1da18d810 --- /dev/null +++ b/source/ap/vim/patches/7.3.218 @@ -0,0 +1,91 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.218 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.218 (after 7.3.212) +Problem: Tiny configuration problem with Python 3. +Solution: Add abiflags in one more place. (Andreas Behr) +Files: src/auto/configure, src/configure.in + + +*** ../mercurial/vim73/src/auto/configure 2011-06-12 21:37:06.000000000 +0200 +--- src/auto/configure 2011-06-13 01:26:50.000000000 +0200 +*************** +*** 5607,5613 **** + @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'" + @echo "python3_LIBS='$(LIBS)'" + @echo "python3_SYSLIBS='$(SYSLIBS)'" +- @echo "python3_LINKFORSHARED='$(LINKFORSHARED)'" + @echo "python3_INSTSONAME='$(INSTSONAME)'" + eof + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" +--- 5607,5612 ---- +*************** +*** 5624,5630 **** + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +--- 5623,5629 ---- + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + if test "x$MACOSX" = "xyes"; then +*** ../mercurial/vim73/src/configure.in 2011-06-12 21:37:06.000000000 +0200 +--- src/configure.in 2011-06-13 01:26:35.000000000 +0200 +*************** +*** 1063,1069 **** + @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'" + @echo "python3_LIBS='$(LIBS)'" + @echo "python3_SYSLIBS='$(SYSLIBS)'" +- @echo "python3_LINKFORSHARED='$(LINKFORSHARED)'" + @echo "python3_INSTSONAME='$(INSTSONAME)'" + eof + dnl -- delete the lines from make about Entering/Leaving directory +--- 1063,1068 ---- +*************** +*** 1080,1086 **** + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +--- 1079,1085 ---- + if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then + PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + else +! PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME=L\\\"${vi_cv_path_python3_pfx}\\\"" + fi + PYTHON3_SRC="if_python3.c" + dnl For Mac OSX 10.2 config.o is included in the Python library. +*** ../vim-7.3.217/src/version.c 2011-06-13 01:19:48.000000000 +0200 +--- src/version.c 2011-06-13 01:29:42.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 218, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +174. You know what a listserv is. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.219 b/source/ap/vim/patches/7.3.219 new file mode 100644 index 000000000..2ec111799 --- /dev/null +++ b/source/ap/vim/patches/7.3.219 @@ -0,0 +1,92 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.219 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.219 +Problem: Can't compile with GTK on Mac. +Solution: Add some #ifdef trickery. (Ben Schmidt) +Files: src/os_mac_conv.c, src/os_macosx.m, src/vim.h + + +*** ../mercurial/vim73/src/os_mac_conv.c 2010-08-16 21:23:30.000000000 +0200 +--- src/os_mac_conv.c 2011-06-13 01:55:17.000000000 +0200 +*************** +*** 14,19 **** +--- 14,21 ---- + */ + + #define NO_X11_INCLUDES ++ #define BalloonEval int /* used in header files */ ++ + #include "vim.h" + #ifndef FEAT_GUI_MAC + # include +*** ../mercurial/vim73/src/os_macosx.m 2010-10-10 17:08:28.000000000 +0200 +--- src/os_macosx.m 2011-06-13 01:58:47.000000000 +0200 +*************** +*** 18,23 **** +--- 18,24 ---- + /* Avoid a conflict for the definition of Boolean between Mac header files and + * X11 header files. */ + #define NO_X11_INCLUDES ++ #define BalloonEval int /* used in header files */ + + #include "vim.h" + #import +*************** +*** 27,35 **** + * Clipboard support for the console. + * Don't include this when building the GUI version, the functions in + * gui_mac.c are used then. TODO: remove those instead? +! * But for MacVim we need these ones. + */ +! #if defined(FEAT_CLIPBOARD) && (!defined(FEAT_GUI) || defined(FEAT_GUI_MACVIM)) + + /* Used to identify clipboard data copied from Vim. */ + +--- 28,36 ---- + * Clipboard support for the console. + * Don't include this when building the GUI version, the functions in + * gui_mac.c are used then. TODO: remove those instead? +! * But for MacVim we do need these ones. + */ +! #if defined(FEAT_CLIPBOARD) && (!defined(FEAT_GUI_ENABLED) || defined(FEAT_GUI_MACVIM)) + + /* Used to identify clipboard data copied from Vim. */ + +*** ../mercurial/vim73/src/vim.h 2011-05-19 18:26:34.000000000 +0200 +--- src/vim.h 2011-06-13 01:57:17.000000000 +0200 +*************** +*** 121,126 **** +--- 121,127 ---- + || defined(FEAT_GUI_W32) \ + || defined(FEAT_GUI_W16) \ + || defined(FEAT_GUI_PHOTON) ++ # define FEAT_GUI_ENABLED /* also defined with NO_X11_INCLUDES */ + # if !defined(FEAT_GUI) && !defined(NO_X11_INCLUDES) + # define FEAT_GUI + # endif +*** ../vim-7.3.218/src/version.c 2011-06-13 01:32:42.000000000 +0200 +--- src/version.c 2011-06-13 02:03:02.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 219, + /**/ + +-- +If Microsoft would build a car... +... the oil, water temperature, and alternator warning lights would +all be replaced by a single "General Protection Fault" warning light. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.220 b/source/ap/vim/patches/7.3.220 new file mode 100644 index 000000000..0122e7fce --- /dev/null +++ b/source/ap/vim/patches/7.3.220 @@ -0,0 +1,1230 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.220 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.220 +Problem: Python 3: vim.error is a 'str' instead of an 'Exception' object, + so 'except' or 'raise' it causes a 'SystemError' exception. + Buffer objects do not support slice assignment. + When exchanging text between Vim and Python, multibyte texts become + gabage or cause Unicode Expceptions, etc. + 'py3file' tries to read in the file as Unicode, sometimes causes + UnicodeDecodeException +Solution: Fix the problems. (lilydjwg) +Files: src/if_py_both.h, src/if_python.c, src/if_python3.c + + +*** ../mercurial/vim73/src/if_py_both.h 2011-03-22 15:47:18.000000000 +0100 +--- src/if_py_both.h 2011-06-18 23:54:25.000000000 +0200 +*************** +*** 65,74 **** + OutputWrite(PyObject *self, PyObject *args) + { + int len; +! char *str; + int error = ((OutputObject *)(self))->error; + +! if (!PyArg_ParseTuple(args, "s#", &str, &len)) + return NULL; + + Py_BEGIN_ALLOW_THREADS +--- 65,74 ---- + OutputWrite(PyObject *self, PyObject *args) + { + int len; +! char *str = NULL; + int error = ((OutputObject *)(self))->error; + +! if (!PyArg_ParseTuple(args, "es#", p_enc, &str, &len)) + return NULL; + + Py_BEGIN_ALLOW_THREADS +*************** +*** 76,81 **** +--- 76,82 ---- + writer((writefn)(error ? emsg : msg), (char_u *)str, len); + Python_Release_Vim(); + Py_END_ALLOW_THREADS ++ PyMem_Free(str); + + Py_INCREF(Py_None); + return Py_None; +*************** +*** 104,113 **** + for (i = 0; i < n; ++i) + { + PyObject *line = PyList_GetItem(list, i); +! char *str; + PyInt len; + +! if (!PyArg_Parse(line, "s#", &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); + Py_DECREF(list); + return NULL; +--- 105,114 ---- + for (i = 0; i < n; ++i) + { + PyObject *line = PyList_GetItem(list, i); +! char *str = NULL; + PyInt len; + +! if (!PyArg_Parse(line, "es#", p_enc, &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); + Py_DECREF(list); + return NULL; +*************** +*** 118,123 **** +--- 119,125 ---- + writer((writefn)(error ? emsg : msg), (char_u *)str, len); + Python_Release_Vim(); + Py_END_ALLOW_THREADS ++ PyMem_Free(str); + } + + Py_DECREF(list); +*************** +*** 681,686 **** +--- 683,689 ---- + { + const char *str; + char *save; ++ PyObject *bytes; + PyInt len; + PyInt i; + char *p; +*************** +*** 691,698 **** + return NULL; + } + +! str = PyString_AsString(obj); +! len = PyString_Size(obj); + + /* + * Error checking: String must not contain newlines, as we +--- 694,702 ---- + return NULL; + } + +! bytes = PyString_AsBytes(obj); /* for Python 2 this does nothing */ +! str = PyString_AsString(bytes); +! len = PyString_Size(bytes); + + /* + * Error checking: String must not contain newlines, as we +*************** +*** 731,736 **** +--- 735,741 ---- + } + + save[i] = '\0'; ++ PyString_FreeBytes(bytes); /* Python 2 does nothing here */ + + return save; + } +*************** +*** 817,823 **** + invalidate_botline(); + } + +! /* Replace a line in the specified buffer. The line number is + * in Vim format (1-based). The replacement line is given as + * a Python string object. The object is checked for validity + * and correct format. Errors are returned as a value of FAIL. +--- 822,829 ---- + invalidate_botline(); + } + +! /* +! * Replace a line in the specified buffer. The line number is + * in Vim format (1-based). The replacement line is given as + * a Python string object. The object is checked for validity + * and correct format. Errors are returned as a value of FAIL. +*************** +*** 908,913 **** +--- 914,1106 ---- + } + } + ++ /* Replace a range of lines in the specified buffer. The line numbers are in ++ * Vim format (1-based). The range is from lo up to, but not including, hi. ++ * The replacement lines are given as a Python list of string objects. The ++ * list is checked for validity and correct format. Errors are returned as a ++ * value of FAIL. The return value is OK on success. ++ * If OK is returned and len_change is not NULL, *len_change ++ * is set to the change in the buffer length. ++ */ ++ static int ++ SetBufferLineList(buf_T *buf, PyInt lo, PyInt hi, PyObject *list, PyInt *len_change) ++ { ++ /* First of all, we check the thpe of the supplied Python object. ++ * There are three cases: ++ * 1. NULL, or None - this is a deletion. ++ * 2. A list - this is a replacement. ++ * 3. Anything else - this is an error. ++ */ ++ if (list == Py_None || list == NULL) ++ { ++ PyInt i; ++ PyInt n = (int)(hi - lo); ++ buf_T *savebuf = curbuf; ++ ++ PyErr_Clear(); ++ curbuf = buf; ++ ++ if (u_savedel((linenr_T)lo, (long)n) == FAIL) ++ PyErr_SetVim(_("cannot save undo information")); ++ else ++ { ++ for (i = 0; i < n; ++i) ++ { ++ if (ml_delete((linenr_T)lo, FALSE) == FAIL) ++ { ++ PyErr_SetVim(_("cannot delete line")); ++ break; ++ } ++ } ++ if (buf == curwin->w_buffer) ++ py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n); ++ deleted_lines_mark((linenr_T)lo, (long)i); ++ } ++ ++ curbuf = savebuf; ++ ++ if (PyErr_Occurred() || VimErrorCheck()) ++ return FAIL; ++ ++ if (len_change) ++ *len_change = -n; ++ ++ return OK; ++ } ++ else if (PyList_Check(list)) ++ { ++ PyInt i; ++ PyInt new_len = PyList_Size(list); ++ PyInt old_len = hi - lo; ++ PyInt extra = 0; /* lines added to text, can be negative */ ++ char **array; ++ buf_T *savebuf; ++ ++ if (new_len == 0) /* avoid allocating zero bytes */ ++ array = NULL; ++ else ++ { ++ array = (char **)alloc((unsigned)(new_len * sizeof(char *))); ++ if (array == NULL) ++ { ++ PyErr_NoMemory(); ++ return FAIL; ++ } ++ } ++ ++ for (i = 0; i < new_len; ++i) ++ { ++ PyObject *line = PyList_GetItem(list, i); ++ ++ array[i] = StringToLine(line); ++ if (array[i] == NULL) ++ { ++ while (i) ++ vim_free(array[--i]); ++ vim_free(array); ++ return FAIL; ++ } ++ } ++ ++ savebuf = curbuf; ++ ++ PyErr_Clear(); ++ curbuf = buf; ++ ++ if (u_save((linenr_T)(lo-1), (linenr_T)hi) == FAIL) ++ PyErr_SetVim(_("cannot save undo information")); ++ ++ /* If the size of the range is reducing (ie, new_len < old_len) we ++ * need to delete some old_len. We do this at the start, by ++ * repeatedly deleting line "lo". ++ */ ++ if (!PyErr_Occurred()) ++ { ++ for (i = 0; i < old_len - new_len; ++i) ++ if (ml_delete((linenr_T)lo, FALSE) == FAIL) ++ { ++ PyErr_SetVim(_("cannot delete line")); ++ break; ++ } ++ extra -= i; ++ } ++ ++ /* For as long as possible, replace the existing old_len with the ++ * new old_len. This is a more efficient operation, as it requires ++ * less memory allocation and freeing. ++ */ ++ if (!PyErr_Occurred()) ++ { ++ for (i = 0; i < old_len && i < new_len; ++i) ++ if (ml_replace((linenr_T)(lo+i), (char_u *)array[i], FALSE) ++ == FAIL) ++ { ++ PyErr_SetVim(_("cannot replace line")); ++ break; ++ } ++ } ++ else ++ i = 0; ++ ++ /* Now we may need to insert the remaining new old_len. If we do, we ++ * must free the strings as we finish with them (we can't pass the ++ * responsibility to vim in this case). ++ */ ++ if (!PyErr_Occurred()) ++ { ++ while (i < new_len) ++ { ++ if (ml_append((linenr_T)(lo + i - 1), ++ (char_u *)array[i], 0, FALSE) == FAIL) ++ { ++ PyErr_SetVim(_("cannot insert line")); ++ break; ++ } ++ vim_free(array[i]); ++ ++i; ++ ++extra; ++ } ++ } ++ ++ /* Free any left-over old_len, as a result of an error */ ++ while (i < new_len) ++ { ++ vim_free(array[i]); ++ ++i; ++ } ++ ++ /* Free the array of old_len. All of its contents have now ++ * been dealt with (either freed, or the responsibility passed ++ * to vim. ++ */ ++ vim_free(array); ++ ++ /* Adjust marks. Invalidate any which lie in the ++ * changed range, and move any in the remainder of the buffer. ++ */ ++ mark_adjust((linenr_T)lo, (linenr_T)(hi - 1), ++ (long)MAXLNUM, (long)extra); ++ changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra); ++ ++ if (buf == curwin->w_buffer) ++ py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)extra); ++ ++ curbuf = savebuf; ++ ++ if (PyErr_Occurred() || VimErrorCheck()) ++ return FAIL; ++ ++ if (len_change) ++ *len_change = new_len - old_len; ++ ++ return OK; ++ } ++ else ++ { ++ PyErr_BadArgument(); ++ return FAIL; ++ } ++ } + + /* Insert a number of lines into the specified buffer after the specifed line. + * The line number is in Vim format (1-based). The lines to be inserted are +*************** +*** 1108,1113 **** +--- 1301,1340 ---- + return -1; + + if (new_end) ++ *new_end = end + len_change; ++ ++ return 0; ++ } ++ ++ static PyInt ++ RBAsSlice(BufferObject *self, PyInt lo, PyInt hi, PyObject *val, PyInt start, PyInt end, PyInt *new_end) ++ { ++ PyInt size; ++ PyInt len_change; ++ ++ /* Self must be a valid buffer */ ++ if (CheckBuffer(self)) ++ return -1; ++ ++ /* Sort out the slice range */ ++ size = end - start + 1; ++ ++ if (lo < 0) ++ lo = 0; ++ else if (lo > size) ++ lo = size; ++ if (hi < 0) ++ hi = 0; ++ if (hi < lo) ++ hi = lo; ++ else if (hi > size) ++ hi = size; ++ ++ if (SetBufferLineList(self->buf, lo + start, hi + start, ++ val, &len_change) == FAIL) ++ return -1; ++ ++ if (new_end) + *new_end = end + len_change; + + return 0; +*** ../mercurial/vim73/src/if_python.c 2011-03-26 18:32:00.000000000 +0100 +--- src/if_python.c 2011-06-19 00:02:15.000000000 +0200 +*************** +*** 56,61 **** +--- 56,65 ---- + + static void init_structs(void); + ++ /* No-op conversion functions, use with care! */ ++ #define PyString_AsBytes(obj) (obj) ++ #define PyString_FreeBytes(obj) ++ + #if !defined(FEAT_PYTHON) && defined(PROTO) + /* Use this to be able to generate prototypes without python being used. */ + # define PyObject Py_ssize_t +*************** +*** 129,134 **** +--- 133,139 ---- + */ + # define PyArg_Parse dll_PyArg_Parse + # define PyArg_ParseTuple dll_PyArg_ParseTuple ++ # define PyMem_Free dll_PyMem_Free + # define PyDict_SetItemString dll_PyDict_SetItemString + # define PyErr_BadArgument dll_PyErr_BadArgument + # define PyErr_Clear dll_PyErr_Clear +*************** +*** 189,194 **** +--- 194,200 ---- + */ + static int(*dll_PyArg_Parse)(PyObject *, char *, ...); + static int(*dll_PyArg_ParseTuple)(PyObject *, char *, ...); ++ static int(*dll_PyMem_Free)(void *); + static int(*dll_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item); + static int(*dll_PyErr_BadArgument)(void); + static void(*dll_PyErr_Clear)(void); +*************** +*** 271,276 **** +--- 277,283 ---- + { + {"PyArg_Parse", (PYTHON_PROC*)&dll_PyArg_Parse}, + {"PyArg_ParseTuple", (PYTHON_PROC*)&dll_PyArg_ParseTuple}, ++ {"PyMem_Free", (PYTHON_PROC*)&dll_PyMem_Free}, + {"PyDict_SetItemString", (PYTHON_PROC*)&dll_PyDict_SetItemString}, + {"PyErr_BadArgument", (PYTHON_PROC*)&dll_PyErr_BadArgument}, + {"PyErr_Clear", (PYTHON_PROC*)&dll_PyErr_Clear}, +*************** +*** 833,876 **** + static PyObject *CurrentGetattr(PyObject *, char *); + static int CurrentSetattr(PyObject *, char *, PyObject *); + +- /* Common routines for buffers and line ranges +- * ------------------------------------------- +- */ +- +- static PyInt +- RBAssSlice(BufferObject *self, PyInt lo, PyInt hi, PyObject *val, PyInt start, PyInt end, PyInt *new_end) +- { +- PyInt size; +- PyInt len_change; +- +- /* Self must be a valid buffer */ +- if (CheckBuffer(self)) +- return -1; +- +- /* Sort out the slice range */ +- size = end - start + 1; +- +- if (lo < 0) +- lo = 0; +- else if (lo > size) +- lo = size; +- if (hi < 0) +- hi = 0; +- if (hi < lo) +- hi = lo; +- else if (hi > size) +- hi = size; +- +- if (SetBufferLineList(self->buf, lo + start, hi + start, +- val, &len_change) == FAIL) +- return -1; +- +- if (new_end) +- *new_end = end + len_change; +- +- return 0; +- } +- + static PySequenceMethods BufferAsSeq = { + (PyInquiry) BufferLength, /* sq_length, len(x) */ + (binaryfunc) 0, /* BufferConcat, */ /* sq_concat, x+y */ +--- 840,845 ---- +*************** +*** 1038,1044 **** + static PyInt + BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { +! return RBAssSlice((BufferObject *)(self), lo, hi, val, 1, + (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } +--- 1007,1013 ---- + static PyInt + BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { +! return RBAsSlice((BufferObject *)(self), lo, hi, val, 1, + (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, + NULL); + } +*************** +*** 1088,1094 **** + static PyInt + RangeAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { +! return RBAssSlice(((RangeObject *)(self))->buf, lo, hi, val, + ((RangeObject *)(self))->start, + ((RangeObject *)(self))->end, + &((RangeObject *)(self))->end); +--- 1057,1063 ---- + static PyInt + RangeAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val) + { +! return RBAsSlice(((RangeObject *)(self))->buf, lo, hi, val, + ((RangeObject *)(self))->start, + ((RangeObject *)(self))->end, + &((RangeObject *)(self))->end); +*************** +*** 1435,1628 **** + * 4. Utility functions for handling the interface between Vim and Python. + */ + +- /* Replace a range of lines in the specified buffer. The line numbers are in +- * Vim format (1-based). The range is from lo up to, but not including, hi. +- * The replacement lines are given as a Python list of string objects. The +- * list is checked for validity and correct format. Errors are returned as a +- * value of FAIL. The return value is OK on success. +- * If OK is returned and len_change is not NULL, *len_change +- * is set to the change in the buffer length. +- */ +- static int +- SetBufferLineList(buf_T *buf, PyInt lo, PyInt hi, PyObject *list, PyInt *len_change) +- { +- /* First of all, we check the thpe of the supplied Python object. +- * There are three cases: +- * 1. NULL, or None - this is a deletion. +- * 2. A list - this is a replacement. +- * 3. Anything else - this is an error. +- */ +- if (list == Py_None || list == NULL) +- { +- PyInt i; +- PyInt n = (int)(hi - lo); +- buf_T *savebuf = curbuf; +- +- PyErr_Clear(); +- curbuf = buf; +- +- if (u_savedel((linenr_T)lo, (long)n) == FAIL) +- PyErr_SetVim(_("cannot save undo information")); +- else +- { +- for (i = 0; i < n; ++i) +- { +- if (ml_delete((linenr_T)lo, FALSE) == FAIL) +- { +- PyErr_SetVim(_("cannot delete line")); +- break; +- } +- } +- if (buf == curwin->w_buffer) +- py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)-n); +- deleted_lines_mark((linenr_T)lo, (long)i); +- } +- +- curbuf = savebuf; +- +- if (PyErr_Occurred() || VimErrorCheck()) +- return FAIL; +- +- if (len_change) +- *len_change = -n; +- +- return OK; +- } +- else if (PyList_Check(list)) +- { +- PyInt i; +- PyInt new_len = PyList_Size(list); +- PyInt old_len = hi - lo; +- PyInt extra = 0; /* lines added to text, can be negative */ +- char **array; +- buf_T *savebuf; +- +- if (new_len == 0) /* avoid allocating zero bytes */ +- array = NULL; +- else +- { +- array = (char **)alloc((unsigned)(new_len * sizeof(char *))); +- if (array == NULL) +- { +- PyErr_NoMemory(); +- return FAIL; +- } +- } +- +- for (i = 0; i < new_len; ++i) +- { +- PyObject *line = PyList_GetItem(list, i); +- +- array[i] = StringToLine(line); +- if (array[i] == NULL) +- { +- while (i) +- vim_free(array[--i]); +- vim_free(array); +- return FAIL; +- } +- } +- +- savebuf = curbuf; +- +- PyErr_Clear(); +- curbuf = buf; +- +- if (u_save((linenr_T)(lo-1), (linenr_T)hi) == FAIL) +- PyErr_SetVim(_("cannot save undo information")); +- +- /* If the size of the range is reducing (ie, new_len < old_len) we +- * need to delete some old_len. We do this at the start, by +- * repeatedly deleting line "lo". +- */ +- if (!PyErr_Occurred()) +- { +- for (i = 0; i < old_len - new_len; ++i) +- if (ml_delete((linenr_T)lo, FALSE) == FAIL) +- { +- PyErr_SetVim(_("cannot delete line")); +- break; +- } +- extra -= i; +- } +- +- /* For as long as possible, replace the existing old_len with the +- * new old_len. This is a more efficient operation, as it requires +- * less memory allocation and freeing. +- */ +- if (!PyErr_Occurred()) +- { +- for (i = 0; i < old_len && i < new_len; ++i) +- if (ml_replace((linenr_T)(lo+i), (char_u *)array[i], FALSE) +- == FAIL) +- { +- PyErr_SetVim(_("cannot replace line")); +- break; +- } +- } +- else +- i = 0; +- +- /* Now we may need to insert the remaining new old_len. If we do, we +- * must free the strings as we finish with them (we can't pass the +- * responsibility to vim in this case). +- */ +- if (!PyErr_Occurred()) +- { +- while (i < new_len) +- { +- if (ml_append((linenr_T)(lo + i - 1), +- (char_u *)array[i], 0, FALSE) == FAIL) +- { +- PyErr_SetVim(_("cannot insert line")); +- break; +- } +- vim_free(array[i]); +- ++i; +- ++extra; +- } +- } +- +- /* Free any left-over old_len, as a result of an error */ +- while (i < new_len) +- { +- vim_free(array[i]); +- ++i; +- } +- +- /* Free the array of old_len. All of its contents have now +- * been dealt with (either freed, or the responsibility passed +- * to vim. +- */ +- vim_free(array); +- +- /* Adjust marks. Invalidate any which lie in the +- * changed range, and move any in the remainder of the buffer. +- */ +- mark_adjust((linenr_T)lo, (linenr_T)(hi - 1), +- (long)MAXLNUM, (long)extra); +- changed_lines((linenr_T)lo, 0, (linenr_T)hi, (long)extra); +- +- if (buf == curwin->w_buffer) +- py_fix_cursor((linenr_T)lo, (linenr_T)hi, (linenr_T)extra); +- +- curbuf = savebuf; +- +- if (PyErr_Occurred() || VimErrorCheck()) +- return FAIL; +- +- if (len_change) +- *len_change = new_len - old_len; +- +- return OK; +- } +- else +- { +- PyErr_BadArgument(); +- return FAIL; +- } +- } +- + /* Convert a Vim line into a Python string. + * All internal newlines are replaced by null characters. + * +--- 1404,1409 ---- +*** ../mercurial/vim73/src/if_python3.c 2011-06-12 21:37:06.000000000 +0200 +--- src/if_python3.c 2011-06-19 00:10:42.000000000 +0200 +*************** +*** 70,77 **** + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsString(obj) _PyUnicode_AsString(obj) +! #define PyString_Size(obj) PyUnicode_GET_SIZE(obj) + #define PyString_FromString(repr) PyUnicode_FromString(repr) + + #if defined(DYNAMIC_PYTHON3) || defined(PROTO) +--- 70,79 ---- + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)p_enc, NULL); +! #define PyString_FreeBytes(obj) Py_XDECREF(bytes) +! #define PyString_AsString(obj) PyBytes_AsString(obj) +! #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) + #define PyString_FromString(repr) PyUnicode_FromString(repr) + + #if defined(DYNAMIC_PYTHON3) || defined(PROTO) +*************** +*** 99,104 **** +--- 101,107 ---- + # define PyArg_Parse py3_PyArg_Parse + # undef PyArg_ParseTuple + # define PyArg_ParseTuple py3_PyArg_ParseTuple ++ # define PyMem_Free py3_PyMem_Free + # define PyDict_SetItemString py3_PyDict_SetItemString + # define PyErr_BadArgument py3_PyErr_BadArgument + # define PyErr_Clear py3_PyErr_Clear +*************** +*** 140,147 **** +--- 143,155 ---- + # define PyModule_AddObject py3_PyModule_AddObject + # define PyImport_AppendInittab py3_PyImport_AppendInittab + # define _PyUnicode_AsString py3__PyUnicode_AsString ++ # undef PyUnicode_AsEncodedString ++ # define PyUnicode_AsEncodedString py3_PyUnicode_AsEncodedString ++ # undef PyBytes_AsString ++ # define PyBytes_AsString py3_PyBytes_AsString + # define PyObject_GenericGetAttr py3_PyObject_GenericGetAttr + # define PySlice_Type (*py3_PySlice_Type) ++ # define PyErr_NewException py3_PyErr_NewException + # ifdef Py_DEBUG + # define _Py_NegativeRefcount py3__Py_NegativeRefcount + # define _Py_RefTotal (*py3__Py_RefTotal) +*************** +*** 157,164 **** + # define PyModule_Create2 py3_PyModule_Create2 + # undef PyUnicode_FromString + # define PyUnicode_FromString py3_PyUnicode_FromString +! # undef PyUnicode_FromStringAndSize +! # define PyUnicode_FromStringAndSize py3_PyUnicode_FromStringAndSize + + # ifdef Py_DEBUG + # undef PyObject_NEW +--- 165,172 ---- + # define PyModule_Create2 py3_PyModule_Create2 + # undef PyUnicode_FromString + # define PyUnicode_FromString py3_PyUnicode_FromString +! # undef PyUnicode_Decode +! # define PyUnicode_Decode py3_PyUnicode_Decode + + # ifdef Py_DEBUG + # undef PyObject_NEW +*************** +*** 199,205 **** + static int (*py3_PyType_Ready)(PyTypeObject *type); + static int (*py3_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item); + static PyObject* (*py3_PyUnicode_FromString)(const char *u); +! static PyObject* (*py3_PyUnicode_FromStringAndSize)(const char *u, Py_ssize_t size); + static long (*py3_PyLong_AsLong)(PyObject *); + static void (*py3_PyErr_SetNone)(PyObject *); + static void (*py3_PyEval_InitThreads)(void); +--- 207,214 ---- + static int (*py3_PyType_Ready)(PyTypeObject *type); + static int (*py3_PyDict_SetItemString)(PyObject *dp, char *key, PyObject *item); + static PyObject* (*py3_PyUnicode_FromString)(const char *u); +! static PyObject* (*py3_PyUnicode_Decode)(const char *u, Py_ssize_t size, +! const char *encoding, const char *errors); + static long (*py3_PyLong_AsLong)(PyObject *); + static void (*py3_PyErr_SetNone)(PyObject *); + static void (*py3_PyEval_InitThreads)(void); +*************** +*** 207,212 **** +--- 216,222 ---- + static PyThreadState*(*py3_PyEval_SaveThread)(void); + static int (*py3_PyArg_Parse)(PyObject *, char *, ...); + static int (*py3_PyArg_ParseTuple)(PyObject *, char *, ...); ++ static int (*py3_PyMem_Free)(void *); + static int (*py3_Py_IsInitialized)(void); + static void (*py3_PyErr_Clear)(void); + static PyObject*(*py3__PyObject_Init)(PyObject *, PyTypeObject *); +*************** +*** 214,224 **** +--- 224,237 ---- + static int (*py3_PyModule_AddObject)(PyObject *m, const char *name, PyObject *o); + static int (*py3_PyImport_AppendInittab)(const char *name, PyObject* (*initfunc)(void)); + static char* (*py3__PyUnicode_AsString)(PyObject *unicode); ++ static PyObject* (*py3_PyUnicode_AsEncodedString)(PyObject *unicode, const char* encoding, const char* errors); ++ static char* (*py3_PyBytes_AsString)(PyObject *bytes); + static PyObject* (*py3_PyObject_GenericGetAttr)(PyObject *obj, PyObject *name); + static PyObject* (*py3_PyModule_Create2)(struct PyModuleDef* module, int module_api_version); + static PyObject* (*py3_PyType_GenericAlloc)(PyTypeObject *type, Py_ssize_t nitems); + static PyObject* (*py3_PyType_GenericNew)(PyTypeObject *type, PyObject *args, PyObject *kwds); + static PyTypeObject* py3_PySlice_Type; ++ static PyObject* (*py3_PyErr_NewException)(char *name, PyObject *base, PyObject *dict); + # ifdef Py_DEBUG + static void (*py3__Py_NegativeRefcount)(const char *fname, int lineno, PyObject *op); + static Py_ssize_t* py3__Py_RefTotal; +*************** +*** 259,264 **** +--- 272,278 ---- + {"Py_SetPythonHome", (PYTHON_PROC*)&py3_Py_SetPythonHome}, + {"Py_Initialize", (PYTHON_PROC*)&py3_Py_Initialize}, + {"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, ++ {"PyMem_Free", (PYTHON_PROC*)&py3_PyMem_Free}, + {"PyList_New", (PYTHON_PROC*)&py3_PyList_New}, + {"PyGILState_Ensure", (PYTHON_PROC*)&py3_PyGILState_Ensure}, + {"PyGILState_Release", (PYTHON_PROC*)&py3_PyGILState_Release}, +*************** +*** 289,295 **** + {"PyEval_RestoreThread", (PYTHON_PROC*)&py3_PyEval_RestoreThread}, + {"PyEval_SaveThread", (PYTHON_PROC*)&py3_PyEval_SaveThread}, + {"PyArg_Parse", (PYTHON_PROC*)&py3_PyArg_Parse}, +- {"PyArg_ParseTuple", (PYTHON_PROC*)&py3_PyArg_ParseTuple}, + {"Py_IsInitialized", (PYTHON_PROC*)&py3_Py_IsInitialized}, + {"_Py_NoneStruct", (PYTHON_PROC*)&py3__Py_NoneStruct}, + {"PyErr_Clear", (PYTHON_PROC*)&py3_PyErr_Clear}, +--- 303,308 ---- +*************** +*** 297,307 **** +--- 310,322 ---- + {"PyModule_AddObject", (PYTHON_PROC*)&py3_PyModule_AddObject}, + {"PyImport_AppendInittab", (PYTHON_PROC*)&py3_PyImport_AppendInittab}, + {"_PyUnicode_AsString", (PYTHON_PROC*)&py3__PyUnicode_AsString}, ++ {"PyBytes_AsString", (PYTHON_PROC*)&py3_PyBytes_AsString}, + {"PyObject_GenericGetAttr", (PYTHON_PROC*)&py3_PyObject_GenericGetAttr}, + {"PyModule_Create2", (PYTHON_PROC*)&py3_PyModule_Create2}, + {"PyType_GenericAlloc", (PYTHON_PROC*)&py3_PyType_GenericAlloc}, + {"PyType_GenericNew", (PYTHON_PROC*)&py3_PyType_GenericNew}, + {"PySlice_Type", (PYTHON_PROC*)&py3_PySlice_Type}, ++ {"PyErr_NewException", (PYTHON_PROC*)&py3_PyErr_NewException}, + # ifdef Py_DEBUG + {"_Py_NegativeRefcount", (PYTHON_PROC*)&py3__Py_NegativeRefcount}, + {"_Py_RefTotal", (PYTHON_PROC*)&py3__Py_RefTotal}, +*************** +*** 337,343 **** + py3_runtime_link_init(char *libname, int verbose) + { + int i; +! void *ucs_from_string, *ucs_from_string_and_size; + + # if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON) + /* Can't have Python and Python3 loaded at the same time. +--- 352,358 ---- + py3_runtime_link_init(char *libname, int verbose) + { + int i; +! void *ucs_from_string, *ucs_decode, *ucs_as_encoded_string; + + # if !(defined(PY_NO_RTLD_GLOBAL) && defined(PY3_NO_RTLD_GLOBAL)) && defined(UNIX) && defined(FEAT_PYTHON) + /* Can't have Python and Python3 loaded at the same time. +*************** +*** 377,395 **** + /* Load unicode functions separately as only the ucs2 or the ucs4 functions + * will be present in the library. */ + ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString"); +! ucs_from_string_and_size = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS2_FromStringAndSize"); +! if (!ucs_from_string || !ucs_from_string_and_size) + { + ucs_from_string = symbol_from_dll(hinstPy3, + "PyUnicodeUCS4_FromString"); +! ucs_from_string_and_size = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS4_FromStringAndSize"); + } +! if (ucs_from_string && ucs_from_string_and_size) + { + py3_PyUnicode_FromString = ucs_from_string; +! py3_PyUnicode_FromStringAndSize = ucs_from_string_and_size; + } + else + { +--- 392,415 ---- + /* Load unicode functions separately as only the ucs2 or the ucs4 functions + * will be present in the library. */ + ucs_from_string = symbol_from_dll(hinstPy3, "PyUnicodeUCS2_FromString"); +! ucs_decode = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS2_Decode"); +! ucs_as_encoded_string = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS2_AsEncodedString"); +! if (!ucs_from_string || !ucs_decode || !ucs_as_encoded_string) + { + ucs_from_string = symbol_from_dll(hinstPy3, + "PyUnicodeUCS4_FromString"); +! ucs_decode = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS4_Decode"); +! ucs_as_encoded_string = symbol_from_dll(hinstPy3, +! "PyUnicodeUCS4_AsEncodedString"); + } +! if (ucs_from_string && ucs_decode && ucs_as_encoded_string) + { + py3_PyUnicode_FromString = ucs_from_string; +! py3_PyUnicode_Decode = ucs_decode; +! py3_PyUnicode_AsEncodedString = ucs_as_encoded_string; + } + else + { +*************** +*** 567,574 **** + /* Remove the element from sys.path that was added because of our + * argv[0] value in Py3Init_vim(). Previously we used an empty + * string, but dependinding on the OS we then get an empty entry or +! * the current directory in sys.path. */ +! PyRun_SimpleString("import sys; sys.path = list(filter(lambda x: x != '/must>not&exist', sys.path))"); + + // lock is created and acquired in PyEval_InitThreads() and thread + // state is created in Py_Initialize() +--- 587,597 ---- + /* Remove the element from sys.path that was added because of our + * argv[0] value in Py3Init_vim(). Previously we used an empty + * string, but dependinding on the OS we then get an empty entry or +! * the current directory in sys.path. +! * Only after vim has been imported, the element does exist in +! * sys.path. +! */ +! PyRun_SimpleString("import vim; import sys; sys.path = list(filter(lambda x: not x.endswith('must>not&exist'), sys.path))"); + + // lock is created and acquired in PyEval_InitThreads() and thread + // state is created in Py_Initialize() +*************** +*** 605,610 **** +--- 628,635 ---- + #if defined(HAVE_LOCALE_H) || defined(X_LOCALE) + char *saved_locale; + #endif ++ PyObject *cmdstr; ++ PyObject *cmdbytes; + + #if defined(MACOS) && !defined(MACOS_X_UNIX) + GetPort(&oldPort); +*************** +*** 634,640 **** + + pygilstate = PyGILState_Ensure(); + +! PyRun_SimpleString((char *)(cmd)); + + PyGILState_Release(pygilstate); + +--- 659,671 ---- + + pygilstate = PyGILState_Ensure(); + +! /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause +! * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)p_enc, NULL); +! cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL); +! Py_XDECREF(cmdstr); +! PyRun_SimpleString(PyBytes_AsString(cmdbytes)); +! Py_XDECREF(cmdbytes); + + PyGILState_Release(pygilstate); + +*************** +*** 693,699 **** + * different options under Windows, meaning that stdio pointers aren't + * compatible between the two. Yuk. + * +! * construct: exec(compile(open('a_filename').read(), 'a_filename', 'exec')) + * + * We need to escape any backslashes or single quotes in the file name, so that + * Python won't mangle the file name. +--- 724,733 ---- + * different options under Windows, meaning that stdio pointers aren't + * compatible between the two. Yuk. + * +! * construct: exec(compile(open('a_filename', 'rb').read(), 'a_filename', 'exec')) +! * +! * Using bytes so that Python can detect the source encoding as it normally +! * does. The doc does not say "compile" accept bytes, though. + * + * We need to escape any backslashes or single quotes in the file name, so that + * Python won't mangle the file name. +*************** +*** 716,723 **** + return; + if (i==0) + { +! strcpy(p,"').read(),'"); +! p += 11; + } + else + { +--- 750,757 ---- + return; + if (i==0) + { +! strcpy(p,"','rb').read(),'"); +! p += 16; + } + else + { +*************** +*** 812,819 **** + + static Py_ssize_t BufferLength(PyObject *); + static PyObject *BufferItem(PyObject *, Py_ssize_t); +- static Py_ssize_t BufferAsItem(PyObject *, Py_ssize_t, PyObject *); + static PyObject* BufferSubscript(PyObject *self, PyObject* idx); + + + /* Line range type - Implementation functions +--- 846,853 ---- + + static Py_ssize_t BufferLength(PyObject *); + static PyObject *BufferItem(PyObject *, Py_ssize_t); + static PyObject* BufferSubscript(PyObject *self, PyObject* idx); ++ static Py_ssize_t BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val); + + + /* Line range type - Implementation functions +*************** +*** 835,841 **** + (ssizeargfunc) 0, /* sq_repeat, x*n */ + (ssizeargfunc) BufferItem, /* sq_item, x[i] */ + 0, /* was_sq_slice, x[i:j] */ +! (ssizeobjargproc) BufferAsItem, /* sq_ass_item, x[i]=v */ + 0, /* sq_ass_slice, x[i:j]=v */ + 0, /* sq_contains */ + 0, /* sq_inplace_concat */ +--- 869,875 ---- + (ssizeargfunc) 0, /* sq_repeat, x*n */ + (ssizeargfunc) BufferItem, /* sq_item, x[i] */ + 0, /* was_sq_slice, x[i:j] */ +! 0, /* sq_ass_item, x[i]=v */ + 0, /* sq_ass_slice, x[i:j]=v */ + 0, /* sq_contains */ + 0, /* sq_inplace_concat */ +*************** +*** 845,851 **** + PyMappingMethods BufferAsMapping = { + /* mp_length */ (lenfunc)BufferLength, + /* mp_subscript */ (binaryfunc)BufferSubscript, +! /* mp_ass_subscript */ (objobjargproc)0, + }; + + +--- 879,885 ---- + PyMappingMethods BufferAsMapping = { + /* mp_length */ (lenfunc)BufferLength, + /* mp_subscript */ (binaryfunc)BufferSubscript, +! /* mp_ass_subscript */ (objobjargproc)BufferAsSubscript, + }; + + +*************** +*** 897,902 **** +--- 931,938 ---- + + if (this->buf && this->buf != INVALID_BUFFER_VALUE) + this->buf->b_python3_ref = NULL; ++ ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static PyObject * +*************** +*** 975,989 **** + (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count); + } + +- static Py_ssize_t +- BufferAsItem(PyObject *self, Py_ssize_t n, PyObject *val) +- { +- return RBAsItem((BufferObject *)(self), n, val, 1, +- (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, +- NULL); +- } +- +- + static PyObject * + BufferSubscript(PyObject *self, PyObject* idx) + { +--- 1011,1016 ---- +*************** +*** 999,1011 **** + &step, &slicelen) < 0) { + return NULL; + } +! return BufferSlice(self,start,stop+1); + } else { + PyErr_SetString(PyExc_IndexError, "Index must be int or slice"); + return NULL; + } + } + + static PySequenceMethods RangeAsSeq = { + (lenfunc) RangeLength, /* sq_length, len(x) */ + (binaryfunc) 0, /* RangeConcat, sq_concat, x+y */ +--- 1026,1064 ---- + &step, &slicelen) < 0) { + return NULL; + } +! return BufferSlice(self,start,stop); + } else { + PyErr_SetString(PyExc_IndexError, "Index must be int or slice"); + return NULL; + } + } + ++ static Py_ssize_t ++ BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val) ++ { ++ if (PyLong_Check(idx)) { ++ long n = PyLong_AsLong(idx); ++ return RBAsItem((BufferObject *)(self), n, val, 1, ++ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count, ++ NULL); ++ } else if (PySlice_Check(idx)) { ++ Py_ssize_t start, stop, step, slicelen; ++ ++ if (PySlice_GetIndicesEx((PySliceObject *)idx, ++ (Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1, ++ &start, &stop, ++ &step, &slicelen) < 0) { ++ return -1; ++ } ++ return RBAsSlice((BufferObject *)(self), start, stop, val, 1, ++ (PyInt)((BufferObject *)(self))->buf->b_ml.ml_line_count, ++ NULL); ++ } else { ++ PyErr_SetString(PyExc_IndexError, "Index must be int or slice"); ++ return -1; ++ } ++ } ++ + static PySequenceMethods RangeAsSeq = { + (lenfunc) RangeLength, /* sq_length, len(x) */ + (binaryfunc) 0, /* RangeConcat, sq_concat, x+y */ +*************** +*** 1032,1037 **** +--- 1085,1091 ---- + RangeDestructor(PyObject *self) + { + Py_DECREF(((RangeObject *)(self))->buf); ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static PyObject * +*************** +*** 1159,1164 **** +--- 1213,1220 ---- + + if (this->win && this->win != INVALID_WINDOW_VALUE) + this->win->w_python3_ref = NULL; ++ ++ Py_TYPE(self)->tp_free((PyObject*)self); + } + + static PyObject * +*************** +*** 1350,1357 **** + PySys_SetArgv(1, argv); + + mod = PyModule_Create(&vimmodule); + +! VimError = Py_BuildValue("s", "vim.error"); + + PyModule_AddObject(mod, "error", VimError); + Py_INCREF((PyObject *)(void *)&TheBufferList); +--- 1406,1416 ---- + PySys_SetArgv(1, argv); + + mod = PyModule_Create(&vimmodule); ++ if (mod == NULL) ++ return NULL; + +! VimError = PyErr_NewException("vim.error", NULL, NULL); +! Py_INCREF(VimError); + + PyModule_AddObject(mod, "error", VimError); + Py_INCREF((PyObject *)(void *)&TheBufferList); +*************** +*** 1404,1410 **** + } + *p = '\0'; + +! result = PyUnicode_FromStringAndSize(tmp, len); + + vim_free(tmp); + return result; +--- 1463,1469 ---- + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)p_enc, NULL); + + vim_free(tmp); + return result; +*** ../vim-7.3.219/src/version.c 2011-06-13 02:03:55.000000000 +0200 +--- src/version.c 2011-06-19 00:25:38.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 220, + /**/ + +-- +I'm in shape. Round IS a shape. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.221 b/source/ap/vim/patches/7.3.221 new file mode 100644 index 000000000..7211a4a66 --- /dev/null +++ b/source/ap/vim/patches/7.3.221 @@ -0,0 +1,287 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.221 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.221 +Problem: Text from the clipboard is sometimes handled as linewise, but not + consistently. +Solution: Assume the text is linewise when it ends in a CR or NL. +Files: src/gui_gtk_x11.c, src/gui_mac.c, src/ops.c, src/os_msdos.c, + src/os_mswin.c, src/os_qnx.c, src/ui.c + + +*** ../mercurial/vim73/src/gui_gtk_x11.c 2011-02-25 17:10:22.000000000 +0100 +--- src/gui_gtk_x11.c 2011-06-19 00:58:31.000000000 +0200 +*************** +*** 1173,1179 **** + char_u *tmpbuf = NULL; + guchar *tmpbuf_utf8 = NULL; + int len; +! int motion_type; + + if (data->selection == clip_plus.gtk_sel_atom) + cbd = &clip_plus; +--- 1173,1179 ---- + char_u *tmpbuf = NULL; + guchar *tmpbuf_utf8 = NULL; + int len; +! int motion_type = MAUTO; + + if (data->selection == clip_plus.gtk_sel_atom) + cbd = &clip_plus; +*************** +*** 1182,1188 **** + + text = (char_u *)data->data; + len = data->length; +- motion_type = MCHAR; + + if (text == NULL || len <= 0) + { +--- 1182,1187 ---- +*** ../mercurial/vim73/src/gui_mac.c 2011-06-12 20:33:30.000000000 +0200 +--- src/gui_mac.c 2011-06-19 00:59:07.000000000 +0200 +*************** +*** 4671,4677 **** + if (flavor) + type = **textOfClip; + else +! type = (strchr(*textOfClip, '\r') != NULL) ? MLINE : MCHAR; + + tempclip = lalloc(scrapSize + 1, TRUE); + mch_memmove(tempclip, *textOfClip + flavor, scrapSize); +--- 4671,4677 ---- + if (flavor) + type = **textOfClip; + else +! type = MAUTO; + + tempclip = lalloc(scrapSize + 1, TRUE); + mch_memmove(tempclip, *textOfClip + flavor, scrapSize); +*** ../mercurial/vim73/src/ops.c 2011-04-01 16:28:33.000000000 +0200 +--- src/ops.c 2011-06-19 00:59:39.000000000 +0200 +*************** +*** 5733,5739 **** + } + } + +! /* Convert from the GUI selection string into the '*'/'+' register */ + void + clip_yank_selection(type, str, len, cbd) + int type; +--- 5733,5741 ---- + } + } + +! /* +! * Convert from the GUI selection string into the '*'/'+' register. +! */ + void + clip_yank_selection(type, str, len, cbd) + int type; +*************** +*** 6090,6098 **** + if (yank_type == MBLOCK) + yank_type = MAUTO; + #endif +- if (yank_type == MAUTO) +- yank_type = ((len > 0 && (str[len - 1] == '\n' || str[len - 1] == '\r')) +- ? MLINE : MCHAR); + str_to_reg(y_current, yank_type, str, len, block_len); + + # ifdef FEAT_CLIPBOARD +--- 6092,6097 ---- +*************** +*** 6113,6125 **** + * is appended. + */ + static void +! str_to_reg(y_ptr, type, str, len, blocklen) + struct yankreg *y_ptr; /* pointer to yank register */ +! int type; /* MCHAR, MLINE or MBLOCK */ + char_u *str; /* string to put in register */ + long len; /* length of string */ + long blocklen; /* width of Visual block */ + { + int lnum; + long start; + long i; +--- 6112,6125 ---- + * is appended. + */ + static void +! str_to_reg(y_ptr, yank_type, str, len, blocklen) + struct yankreg *y_ptr; /* pointer to yank register */ +! int yank_type; /* MCHAR, MLINE, MBLOCK, MAUTO */ + char_u *str; /* string to put in register */ + long len; /* length of string */ + long blocklen; /* width of Visual block */ + { ++ int type; /* MCHAR, MLINE or MBLOCK */ + int lnum; + long start; + long i; +*************** +*** 6136,6141 **** +--- 6136,6147 ---- + if (y_ptr->y_array == NULL) /* NULL means empty register */ + y_ptr->y_size = 0; + ++ if (yank_type == MAUTO) ++ type = ((len > 0 && (str[len - 1] == NL || str[len - 1] == CAR)) ++ ? MLINE : MCHAR); ++ else ++ type = yank_type; ++ + /* + * Count the number of lines within the string + */ +*** ../mercurial/vim73/src/os_msdos.c 2010-12-17 18:06:00.000000000 +0100 +--- src/os_msdos.c 2011-06-19 01:00:56.000000000 +0200 +*************** +*** 2232,2238 **** + void + clip_mch_request_selection(VimClipboard *cbd) + { +! int type = MCHAR; + char_u *pAllocated = NULL; + char_u *pClipText = NULL; + int clip_data_format = 0; +--- 2232,2238 ---- + void + clip_mch_request_selection(VimClipboard *cbd) + { +! int type = MAUTO; + char_u *pAllocated = NULL; + char_u *pClipText = NULL; + int clip_data_format = 0; +*************** +*** 2280,2293 **** + { + clip_data_format = CF_TEXT; + pClipText = pAllocated; +- type = (vim_strchr((char*)pClipText, '\r') != NULL) ? MLINE : MCHAR; + } + + else if ((pAllocated = Win16GetClipboardData(CF_OEMTEXT)) != NULL) + { + clip_data_format = CF_OEMTEXT; + pClipText = pAllocated; +- type = (vim_strchr((char*)pClipText, '\r') != NULL) ? MLINE : MCHAR; + } + + /* Did we get anything? */ +--- 2280,2291 ---- +*** ../mercurial/vim73/src/os_mswin.c 2011-01-17 20:08:04.000000000 +0100 +--- src/os_mswin.c 2011-06-19 01:01:51.000000000 +0200 +*************** +*** 1410,1418 **** + { + char_u *temp_clipboard; + +! /* If the type is not known guess it. */ + if (metadata.type == -1) +! metadata.type = (vim_strchr(str, '\n') == NULL) ? MCHAR : MLINE; + + /* Translate into . */ + temp_clipboard = crnl_to_nl(str, &str_size); +--- 1410,1418 ---- + { + char_u *temp_clipboard; + +! /* If the type is not known detect it. */ + if (metadata.type == -1) +! metadata.type = MAUTO; + + /* Translate into . */ + temp_clipboard = crnl_to_nl(str, &str_size); +*** ../mercurial/vim73/src/os_qnx.c 2010-05-15 21:22:11.000000000 +0200 +--- src/os_qnx.c 2011-06-19 01:02:26.000000000 +0200 +*************** +*** 93,99 **** + clip_length = clip_header->length - 1; + + if( clip_text != NULL && is_type_set == FALSE ) +! type = (strchr( clip_text, '\r' ) != NULL) ? MLINE : MCHAR; + } + + if( (clip_text != NULL) && (clip_length > 0) ) +--- 93,99 ---- + clip_length = clip_header->length - 1; + + if( clip_text != NULL && is_type_set == FALSE ) +! type = MAUTO; + } + + if( (clip_text != NULL) && (clip_length > 0) ) +*** ../mercurial/vim73/src/ui.c 2010-09-21 22:09:28.000000000 +0200 +--- src/ui.c 2011-06-19 01:03:31.000000000 +0200 +*************** +*** 1609,1615 **** + + #if defined(FEAT_HANGULIN) || defined(PROTO) + void +! push_raw_key (s, len) + char_u *s; + int len; + { +--- 1609,1615 ---- + + #if defined(FEAT_HANGULIN) || defined(PROTO) + void +! push_raw_key(s, len) + char_u *s; + int len; + { +*************** +*** 2016,2022 **** + long_u *length; + int *format; + { +! int motion_type; + long_u len; + char_u *p; + char **text_list = NULL; +--- 2016,2022 ---- + long_u *length; + int *format; + { +! int motion_type = MAUTO; + long_u len; + char_u *p; + char **text_list = NULL; +*************** +*** 2036,2042 **** + *(int *)success = FALSE; + return; + } +- motion_type = MCHAR; + p = (char_u *)value; + len = *length; + if (*type == vim_atom) +--- 2036,2041 ---- +*** ../vim-7.3.220/src/version.c 2011-06-19 00:27:46.000000000 +0200 +--- src/version.c 2011-06-19 01:03:59.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 221, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +190. You quickly hand over your wallet, leather jacket, and car keys + during a mugging, then proceed to beat the crap out of your + assailant when he asks for your laptop. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.222 b/source/ap/vim/patches/7.3.222 new file mode 100644 index 000000000..87151b5ab --- /dev/null +++ b/source/ap/vim/patches/7.3.222 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.22 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.222 +Problem: Warning for building GvimExt. +Solution: Comment-out the DESCRIPTION line. (Mike Williams) +Files: src/GvimExt/gvimext.def, src/GvimExt/gvimext_ming.def + + +*** ../mercurial/vim73/src/GvimExt/gvimext.def 2010-05-15 21:22:11.000000000 +0200 +--- src/GvimExt/gvimext.def 2011-06-15 03:50:55.000000000 +0200 +*************** +*** 1,7 **** + ;gvimdef.def : Declares the module parameters for the DLL. + + LIBRARY gvimext +! DESCRIPTION 'Vim Shell Extension' + + EXPORTS + DllCanUnloadNow private +--- 1,7 ---- + ;gvimdef.def : Declares the module parameters for the DLL. + + LIBRARY gvimext +! ; DESCRIPTION 'Vim Shell Extension' + + EXPORTS + DllCanUnloadNow private +*** ../mercurial/vim73/src/GvimExt/gvimext_ming.def 2010-05-15 21:22:11.000000000 +0200 +--- src/GvimExt/gvimext_ming.def 2011-06-15 03:51:05.000000000 +0200 +*************** +*** 3,9 **** + ;Hence this is the same file as gvimext.def with private removed + + LIBRARY gvimext +! DESCRIPTION 'Vim Shell Extension build with MinGW' + + EXPORTS + DllCanUnloadNow = DllCanUnloadNow@0 +--- 3,9 ---- + ;Hence this is the same file as gvimext.def with private removed + + LIBRARY gvimext +! ; DESCRIPTION 'Vim Shell Extension build with MinGW' + + EXPORTS + DllCanUnloadNow = DllCanUnloadNow@0 +*** ../vim-7.3.221/src/version.c 2011-06-19 01:14:23.000000000 +0200 +--- src/version.c 2011-06-19 01:26:57.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 222, + /**/ + +-- +What is the difference between a professional and an amateur? +The ark was built by an amateur; professionals gave us the Titanic. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.223 b/source/ap/vim/patches/7.3.223 new file mode 100644 index 000000000..e151c5b74 --- /dev/null +++ b/source/ap/vim/patches/7.3.223 @@ -0,0 +1,387 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.223 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.223 +Problem: MingW cross compilation doesn't work with tiny features. +Solution: Move acp_to_enc(), enc_to_utf16() and utf16_to_enc() outside of + "#ifdef CLIPBOARD". Fix typo in makefile. +Files: src/Make_ming.mak, src/os_mswin.c + + +*** ../mercurial/vim73/src/Make_ming.mak 2010-12-30 14:50:46.000000000 +0100 +--- src/Make_ming.mak 2011-06-19 01:20:16.000000000 +0200 +*************** +*** 87,93 **** + + # If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext + # or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/ +! # uncomment the following, but I can't build a static versión with them, ?-(| + #GETTEXT=c:/gettext-0.10.37-20010430 + #STATIC_GETTEXT=USE_STATIC_GETTEXT + #DYNAMIC_GETTEXT=DYNAMIC_GETTEXT +--- 87,93 ---- + + # If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext + # or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/ +! # uncomment the following, but I can't build a static version with them, ?-(| + #GETTEXT=c:/gettext-0.10.37-20010430 + #STATIC_GETTEXT=USE_STATIC_GETTEXT + #DYNAMIC_GETTEXT=DYNAMIC_GETTEXT +*** ../mercurial/vim73/src/os_mswin.c 2011-06-19 01:14:23.000000000 +0200 +--- src/os_mswin.c 2011-06-19 01:25:23.000000000 +0200 +*************** +*** 1105,1236 **** + return ret; + } + +- #if defined(FEAT_MBYTE) || defined(PROTO) +- /* +- * Note: the following two functions are only guaranteed to work when using +- * valid MS-Windows codepages or when iconv() is available. +- */ +- +- /* +- * Convert "str" from 'encoding' to UTF-16. +- * Input in "str" with length "*lenp". When "lenp" is NULL, use strlen(). +- * Output is returned as an allocated string. "*lenp" is set to the length of +- * the result. A trailing NUL is always added. +- * Returns NULL when out of memory. +- */ +- short_u * +- enc_to_utf16(char_u *str, int *lenp) +- { +- vimconv_T conv; +- WCHAR *ret; +- char_u *allocbuf = NULL; +- int len_loc; +- int length; +- +- if (lenp == NULL) +- { +- len_loc = (int)STRLEN(str) + 1; +- lenp = &len_loc; +- } +- +- if (enc_codepage > 0) +- { +- /* We can do any CP### -> UTF-16 in one pass, and we can do it +- * without iconv() (convert_* may need iconv). */ +- MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length); +- } +- else +- { +- /* Use "latin1" by default, we might be called before we have p_enc +- * set up. Convert to utf-8 first, works better with iconv(). Does +- * nothing if 'encoding' is "utf-8". */ +- conv.vc_type = CONV_NONE; +- if (convert_setup(&conv, p_enc ? p_enc : (char_u *)"latin1", +- (char_u *)"utf-8") == FAIL) +- return NULL; +- if (conv.vc_type != CONV_NONE) +- { +- str = allocbuf = string_convert(&conv, str, lenp); +- if (str == NULL) +- return NULL; +- } +- convert_setup(&conv, NULL, NULL); +- +- length = utf8_to_utf16(str, *lenp, NULL, NULL); +- ret = (WCHAR *)alloc((unsigned)((length + 1) * sizeof(WCHAR))); +- if (ret != NULL) +- { +- utf8_to_utf16(str, *lenp, (short_u *)ret, NULL); +- ret[length] = 0; +- } +- +- vim_free(allocbuf); +- } +- +- *lenp = length; +- return (short_u *)ret; +- } +- +- /* +- * Convert an UTF-16 string to 'encoding'. +- * Input in "str" with length (counted in wide characters) "*lenp". When +- * "lenp" is NULL, use wcslen(). +- * Output is returned as an allocated string. If "*lenp" is not NULL it is +- * set to the length of the result. +- * Returns NULL when out of memory. +- */ +- char_u * +- utf16_to_enc(short_u *str, int *lenp) +- { +- vimconv_T conv; +- char_u *utf8_str = NULL, *enc_str = NULL; +- int len_loc; +- +- if (lenp == NULL) +- { +- len_loc = (int)wcslen(str) + 1; +- lenp = &len_loc; +- } +- +- if (enc_codepage > 0) +- { +- /* We can do any UTF-16 -> CP### in one pass. */ +- int length; +- +- WideCharToMultiByte_alloc(enc_codepage, 0, str, *lenp, +- (LPSTR *)&enc_str, &length, 0, 0); +- *lenp = length; +- return enc_str; +- } +- +- /* Avoid allocating zero bytes, it generates an error message. */ +- utf8_str = alloc(utf16_to_utf8(str, *lenp == 0 ? 1 : *lenp, NULL)); +- if (utf8_str != NULL) +- { +- *lenp = utf16_to_utf8(str, *lenp, utf8_str); +- +- /* We might be called before we have p_enc set up. */ +- conv.vc_type = CONV_NONE; +- convert_setup(&conv, (char_u *)"utf-8", +- p_enc? p_enc: (char_u *)"latin1"); +- if (conv.vc_type == CONV_NONE) +- { +- /* p_enc is utf-8, so we're done. */ +- enc_str = utf8_str; +- } +- else +- { +- enc_str = string_convert(&conv, utf8_str, lenp); +- vim_free(utf8_str); +- } +- +- convert_setup(&conv, NULL, NULL); +- } +- +- return enc_str; +- } +- #endif /* FEAT_MBYTE */ +- + /* + * Wait for another process to Close the Clipboard. + * Returns TRUE for success. +--- 1105,1110 ---- +*************** +*** 1436,1467 **** + #endif + } + +- #if (defined(FEAT_MBYTE) && defined(WIN3264)) || defined(PROTO) +- /* +- * Convert from the active codepage to 'encoding'. +- * Input is "str[str_size]". +- * The result is in allocated memory: "out[outlen]". With terminating NUL. +- */ +- void +- acp_to_enc(str, str_size, out, outlen) +- char_u *str; +- int str_size; +- char_u **out; +- int *outlen; +- +- { +- LPWSTR widestr; +- +- MultiByteToWideChar_alloc(GetACP(), 0, str, str_size, &widestr, outlen); +- if (widestr != NULL) +- { +- ++*outlen; /* Include the 0 after the string */ +- *out = utf16_to_enc((short_u *)widestr, outlen); +- vim_free(widestr); +- } +- } +- #endif +- + /* + * Send the current selection to the clipboard. + */ +--- 1310,1315 ---- +*************** +*** 1626,1631 **** +--- 1474,1631 ---- + + #endif /* FEAT_CLIPBOARD */ + ++ #if defined(FEAT_MBYTE) || defined(PROTO) ++ /* ++ * Note: the following two functions are only guaranteed to work when using ++ * valid MS-Windows codepages or when iconv() is available. ++ */ ++ ++ /* ++ * Convert "str" from 'encoding' to UTF-16. ++ * Input in "str" with length "*lenp". When "lenp" is NULL, use strlen(). ++ * Output is returned as an allocated string. "*lenp" is set to the length of ++ * the result. A trailing NUL is always added. ++ * Returns NULL when out of memory. ++ */ ++ short_u * ++ enc_to_utf16(char_u *str, int *lenp) ++ { ++ vimconv_T conv; ++ WCHAR *ret; ++ char_u *allocbuf = NULL; ++ int len_loc; ++ int length; ++ ++ if (lenp == NULL) ++ { ++ len_loc = (int)STRLEN(str) + 1; ++ lenp = &len_loc; ++ } ++ ++ if (enc_codepage > 0) ++ { ++ /* We can do any CP### -> UTF-16 in one pass, and we can do it ++ * without iconv() (convert_* may need iconv). */ ++ MultiByteToWideChar_alloc(enc_codepage, 0, str, *lenp, &ret, &length); ++ } ++ else ++ { ++ /* Use "latin1" by default, we might be called before we have p_enc ++ * set up. Convert to utf-8 first, works better with iconv(). Does ++ * nothing if 'encoding' is "utf-8". */ ++ conv.vc_type = CONV_NONE; ++ if (convert_setup(&conv, p_enc ? p_enc : (char_u *)"latin1", ++ (char_u *)"utf-8") == FAIL) ++ return NULL; ++ if (conv.vc_type != CONV_NONE) ++ { ++ str = allocbuf = string_convert(&conv, str, lenp); ++ if (str == NULL) ++ return NULL; ++ } ++ convert_setup(&conv, NULL, NULL); ++ ++ length = utf8_to_utf16(str, *lenp, NULL, NULL); ++ ret = (WCHAR *)alloc((unsigned)((length + 1) * sizeof(WCHAR))); ++ if (ret != NULL) ++ { ++ utf8_to_utf16(str, *lenp, (short_u *)ret, NULL); ++ ret[length] = 0; ++ } ++ ++ vim_free(allocbuf); ++ } ++ ++ *lenp = length; ++ return (short_u *)ret; ++ } ++ ++ /* ++ * Convert an UTF-16 string to 'encoding'. ++ * Input in "str" with length (counted in wide characters) "*lenp". When ++ * "lenp" is NULL, use wcslen(). ++ * Output is returned as an allocated string. If "*lenp" is not NULL it is ++ * set to the length of the result. ++ * Returns NULL when out of memory. ++ */ ++ char_u * ++ utf16_to_enc(short_u *str, int *lenp) ++ { ++ vimconv_T conv; ++ char_u *utf8_str = NULL, *enc_str = NULL; ++ int len_loc; ++ ++ if (lenp == NULL) ++ { ++ len_loc = (int)wcslen(str) + 1; ++ lenp = &len_loc; ++ } ++ ++ if (enc_codepage > 0) ++ { ++ /* We can do any UTF-16 -> CP### in one pass. */ ++ int length; ++ ++ WideCharToMultiByte_alloc(enc_codepage, 0, str, *lenp, ++ (LPSTR *)&enc_str, &length, 0, 0); ++ *lenp = length; ++ return enc_str; ++ } ++ ++ /* Avoid allocating zero bytes, it generates an error message. */ ++ utf8_str = alloc(utf16_to_utf8(str, *lenp == 0 ? 1 : *lenp, NULL)); ++ if (utf8_str != NULL) ++ { ++ *lenp = utf16_to_utf8(str, *lenp, utf8_str); ++ ++ /* We might be called before we have p_enc set up. */ ++ conv.vc_type = CONV_NONE; ++ convert_setup(&conv, (char_u *)"utf-8", ++ p_enc? p_enc: (char_u *)"latin1"); ++ if (conv.vc_type == CONV_NONE) ++ { ++ /* p_enc is utf-8, so we're done. */ ++ enc_str = utf8_str; ++ } ++ else ++ { ++ enc_str = string_convert(&conv, utf8_str, lenp); ++ vim_free(utf8_str); ++ } ++ ++ convert_setup(&conv, NULL, NULL); ++ } ++ ++ return enc_str; ++ } ++ #endif /* FEAT_MBYTE */ ++ ++ #if (defined(FEAT_MBYTE) && defined(WIN3264)) || defined(PROTO) ++ /* ++ * Convert from the active codepage to 'encoding'. ++ * Input is "str[str_size]". ++ * The result is in allocated memory: "out[outlen]". With terminating NUL. ++ */ ++ void ++ acp_to_enc(str, str_size, out, outlen) ++ char_u *str; ++ int str_size; ++ char_u **out; ++ int *outlen; ++ ++ { ++ LPWSTR widestr; ++ ++ MultiByteToWideChar_alloc(GetACP(), 0, str, str_size, &widestr, outlen); ++ if (widestr != NULL) ++ { ++ ++*outlen; /* Include the 0 after the string */ ++ *out = utf16_to_enc((short_u *)widestr, outlen); ++ vim_free(widestr); ++ } ++ } ++ #endif ++ + + /* + * Debugging helper: expose the MCH_WRITE_DUMP stuff to other modules +*** ../vim-7.3.222/src/version.c 2011-06-19 01:27:29.000000000 +0200 +--- src/version.c 2011-06-19 01:28:41.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 223, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +191. You rate eating establishments not by the quality of the food, + but by the availability of electrical outlets for your PowerBook. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.224 b/source/ap/vim/patches/7.3.224 new file mode 100644 index 000000000..1673f4768 --- /dev/null +++ b/source/ap/vim/patches/7.3.224 @@ -0,0 +1,162 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.224 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.224 +Problem: Can't pass dict to sort function. +Solution: Add the optional {dict} argument to sort(). (ZyX) +Files: runtime/doc/eval.txt, src/eval.c + + +*** ../mercurial/vim73/runtime/doc/eval.txt 2011-05-19 17:25:36.000000000 +0200 +--- runtime/doc/eval.txt 2011-06-19 02:42:52.000000000 +0200 +*************** +*** 1919,1925 **** + simplify( {filename}) String simplify filename as much as possible + sin( {expr}) Float sine of {expr} + sinh( {expr}) Float hyperbolic sine of {expr} +! sort( {list} [, {func}]) List sort {list}, using {func} to compare + soundfold( {word}) String sound-fold {word} + spellbadword() String badly spelled word at cursor + spellsuggest( {word} [, {max} [, {capital}]]) +--- 1922,1929 ---- + simplify( {filename}) String simplify filename as much as possible + sin( {expr}) Float sine of {expr} + sinh( {expr}) Float hyperbolic sine of {expr} +! sort( {list} [, {func} [, {dict}]]) +! List sort {list}, using {func} to compare + soundfold( {word}) String sound-fold {word} + spellbadword() String badly spelled word at cursor + spellsuggest( {word} [, {max} [, {capital}]]) +*************** +*** 5275,5281 **** + {only available when compiled with the |+float| feature} + + +! sort({list} [, {func}]) *sort()* *E702* + Sort the items in {list} in-place. Returns {list}. If you + want a list to remain unmodified make a copy first: > + :let sortedlist = sort(copy(mylist)) +--- 5279,5285 ---- + {only available when compiled with the |+float| feature} + + +! sort({list} [, {func} [, {dict}]]) *sort()* *E702* + Sort the items in {list} in-place. Returns {list}. If you + want a list to remain unmodified make a copy first: > + :let sortedlist = sort(copy(mylist)) +*************** +*** 5283,5288 **** +--- 5287,5294 ---- + Numbers sort after Strings, |Lists| after Numbers. + For sorting text in the current buffer use |:sort|. + When {func} is given and it is one then case is ignored. ++ {dict} is for functions with the "dict" attribute. It will be ++ used to set the local variable "self". |Dictionary-function| + When {func} is a |Funcref| or a function name, this function + is called to compare items. The function is invoked with two + items as argument and must return zero if they are equal, 1 or +*** ../mercurial/vim73/src/eval.c 2011-05-19 18:26:34.000000000 +0200 +--- src/eval.c 2011-06-19 02:51:13.000000000 +0200 +*************** +*** 7930,7936 **** + {"sin", 1, 1, f_sin}, + {"sinh", 1, 1, f_sinh}, + #endif +! {"sort", 1, 2, f_sort}, + {"soundfold", 1, 1, f_soundfold}, + {"spellbadword", 0, 1, f_spellbadword}, + {"spellsuggest", 1, 3, f_spellsuggest}, +--- 7930,7936 ---- + {"sin", 1, 1, f_sin}, + {"sinh", 1, 1, f_sinh}, + #endif +! {"sort", 1, 3, f_sort}, + {"soundfold", 1, 1, f_soundfold}, + {"spellbadword", 0, 1, f_spellbadword}, + {"spellsuggest", 1, 3, f_spellsuggest}, +*************** +*** 16366,16371 **** +--- 16366,16372 ---- + + static int item_compare_ic; + static char_u *item_compare_func; ++ static dict_T *item_compare_selfdict; + static int item_compare_func_err; + #define ITEM_COMPARE_FAIL 999 + +*************** +*** 16425,16431 **** + + rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */ + res = call_func(item_compare_func, (int)STRLEN(item_compare_func), +! &rettv, 2, argv, 0L, 0L, &dummy, TRUE, NULL); + clear_tv(&argv[0]); + clear_tv(&argv[1]); + +--- 16426,16433 ---- + + rettv.v_type = VAR_UNKNOWN; /* clear_tv() uses this */ + res = call_func(item_compare_func, (int)STRLEN(item_compare_func), +! &rettv, 2, argv, 0L, 0L, &dummy, TRUE, +! item_compare_selfdict); + clear_tv(&argv[0]); + clear_tv(&argv[1]); + +*************** +*** 16471,16478 **** +--- 16473,16482 ---- + + item_compare_ic = FALSE; + item_compare_func = NULL; ++ item_compare_selfdict = NULL; + if (argvars[1].v_type != VAR_UNKNOWN) + { ++ /* optional second argument: {func} */ + if (argvars[1].v_type == VAR_FUNC) + item_compare_func = argvars[1].vval.v_string; + else +*************** +*** 16487,16492 **** +--- 16491,16507 ---- + else + item_compare_func = get_tv_string(&argvars[1]); + } ++ ++ if (argvars[2].v_type != VAR_UNKNOWN) ++ { ++ /* optional third argument: {dict} */ ++ if (argvars[2].v_type != VAR_DICT) ++ { ++ EMSG(_(e_dictreq)); ++ return; ++ } ++ item_compare_selfdict = argvars[2].vval.v_dict; ++ } + } + + /* Make an array with each entry pointing to an item in the List. */ +*** ../vim-7.3.223/src/version.c 2011-06-19 01:30:01.000000000 +0200 +--- src/version.c 2011-06-19 02:52:46.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 224, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +193. You ask your girlfriend to drive home so you can sit back with + your PDA and download the information to your laptop + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.225 b/source/ap/vim/patches/7.3.225 new file mode 100644 index 000000000..5a32b9a62 Binary files /dev/null and b/source/ap/vim/patches/7.3.225 differ diff --git a/source/ap/vim/patches/7.3.226 b/source/ap/vim/patches/7.3.226 new file mode 100644 index 000000000..0002aa77f --- /dev/null +++ b/source/ap/vim/patches/7.3.226 @@ -0,0 +1,58 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.226 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.226 +Problem: On a 64 bit system "syn sync fromstart" is very slow. (Bjorn + Steinbrink) +Solution: Store the state when starting to parse from the first line. +Files: src/syntax.c + + +*** ../mercurial/vim73/src/syntax.c 2011-05-25 17:56:23.000000000 +0200 +--- src/syntax.c 2011-06-19 04:47:08.000000000 +0200 +*************** +*** 559,565 **** + if (INVALID_STATE(¤t_state)) + { + syn_sync(wp, lnum, last_valid); +! first_stored = current_lnum + syn_block->b_syn_sync_minlines; + } + else + first_stored = current_lnum; +--- 559,571 ---- + if (INVALID_STATE(¤t_state)) + { + syn_sync(wp, lnum, last_valid); +! if (current_lnum == 1) +! /* First line is always valid, no matter "minlines". */ +! first_stored = 1; +! else +! /* Need to parse "minlines" lines before state can be considered +! * valid to store. */ +! first_stored = current_lnum + syn_block->b_syn_sync_minlines; + } + else + first_stored = current_lnum; +*** ../vim-7.3.225/src/version.c 2011-06-19 04:31:54.000000000 +0200 +--- src/version.c 2011-06-19 04:49:53.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 226, + /**/ + +-- +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 /// diff --git a/source/ap/vim/patches/7.3.227 b/source/ap/vim/patches/7.3.227 new file mode 100644 index 000000000..55d5a9c6b --- /dev/null +++ b/source/ap/vim/patches/7.3.227 @@ -0,0 +1,109 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.227 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.227 (after 7.3.221) +Problem: Mac OS doesn't have the linewise clipboard fix. +Solution: Also change the Mac OS file. (Bjorn Winckler) +Files: src/os_macosx.m + + +*** ../mercurial/vim73/src/os_macosx.m 2011-06-13 02:03:55.000000000 +0200 +--- src/os_macosx.m 2011-06-20 00:23:57.000000000 +0200 +*************** +*** 65,71 **** + NSString *bestType = [pb availableTypeFromArray:supportedTypes]; + if (!bestType) goto releasepool; + +! int motion_type = MCHAR; + NSString *string = nil; + + if ([bestType isEqual:VimPboardType]) +--- 65,71 ---- + NSString *bestType = [pb availableTypeFromArray:supportedTypes]; + if (!bestType) goto releasepool; + +! int motion_type = MAUTO; + NSString *string = nil; + + if ([bestType isEqual:VimPboardType]) +*************** +*** 89,97 **** + + if (!string) + { +! /* Use NSStringPboardType. The motion type is set to line-wise if the +! * string contains at least one EOL character, otherwise it is set to +! * character-wise (block-wise is never used). + */ + NSMutableString *mstring = + [[pb stringForType:NSStringPboardType] mutableCopy]; +--- 89,95 ---- + + if (!string) + { +! /* Use NSStringPboardType. The motion type is detected automatically. + */ + NSMutableString *mstring = + [[pb stringForType:NSStringPboardType] mutableCopy]; +*************** +*** 108,126 **** + options:0 range:range]; + } + +- /* Scan for newline character to decide whether the string should be +- * pasted line-wise or character-wise. +- */ +- motion_type = MCHAR; +- if (0 < n || NSNotFound != [mstring rangeOfString:@"\n"].location) +- motion_type = MLINE; +- + string = mstring; + } + + if (!(MCHAR == motion_type || MLINE == motion_type || MBLOCK == motion_type + || MAUTO == motion_type)) +! motion_type = MCHAR; + + char_u *str = (char_u*)[string UTF8String]; + int len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; +--- 106,118 ---- + options:0 range:range]; + } + + string = mstring; + } + ++ /* Default to MAUTO, uses MCHAR or MLINE depending on trailing NL. */ + if (!(MCHAR == motion_type || MLINE == motion_type || MBLOCK == motion_type + || MAUTO == motion_type)) +! motion_type = MAUTO; + + char_u *str = (char_u*)[string UTF8String]; + int len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; +*** ../vim-7.3.226/src/version.c 2011-06-19 04:54:17.000000000 +0200 +--- src/version.c 2011-06-20 00:21:53.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 227, + /**/ + +-- +Some of the well know MS-Windows errors: + EMULTI Multitasking attempted, system confused + EKEYBOARD Keyboard locked, try getting out of this one! + EXPLAIN Unexplained error, please tell us what happened + EFUTURE Reserved for our future mistakes + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.228 b/source/ap/vim/patches/7.3.228 new file mode 100644 index 000000000..3edede597 --- /dev/null +++ b/source/ap/vim/patches/7.3.228 @@ -0,0 +1,45 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.228 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.228 +Problem: "2gj" does not always move to the correct position. +Solution: Get length of line after moving to a next line. (James Vega) +Files: src/normal.c + + +*** ../mercurial/vim73/src/normal.c 2011-05-10 17:29:28.000000000 +0200 +--- src/normal.c 2011-06-20 00:41:43.000000000 +0200 +*************** +*** 4533,4538 **** +--- 4533,4539 ---- + } + curwin->w_cursor.lnum++; + curwin->w_curswant %= width2; ++ linelen = linetabsize(ml_get_curline()); + } + } + } +*** ../vim-7.3.227/src/version.c 2011-06-20 00:25:37.000000000 +0200 +--- src/version.c 2011-06-20 00:45:15.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 228, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +197. Your desk collapses under the weight of your computer peripherals. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.229 b/source/ap/vim/patches/7.3.229 new file mode 100644 index 000000000..b133f7a48 --- /dev/null +++ b/source/ap/vim/patches/7.3.229 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.229 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.229 +Problem: Using fork() makes gvim crash on Mac when build with + CoreFoundation. +Solution: Disallow fork() when __APPLE__ is defined. (Hisashi T Fujinaka) +Files: src/gui.c + + +*** ../mercurial/vim73/src/gui.c 2011-05-10 16:41:13.000000000 +0200 +--- src/gui.c 2011-06-20 00:51:21.000000000 +0200 +*************** +*** 59,65 **** + gui_start() + { + char_u *old_term; +! #if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) + # define MAY_FORK + int dofork = TRUE; + #endif +--- 59,66 ---- + gui_start() + { + char_u *old_term; +! #if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) \ +! && !defined(__APPLE__) + # define MAY_FORK + int dofork = TRUE; + #endif +*** ../vim-7.3.228/src/version.c 2011-06-20 00:45:55.000000000 +0200 +--- src/version.c 2011-06-20 00:50:42.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 229, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +198. You read all the quotes at Netaholics Anonymous and keep thinking + "What's wrong with that?" + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.230 b/source/ap/vim/patches/7.3.230 new file mode 100644 index 000000000..80fcdf130 --- /dev/null +++ b/source/ap/vim/patches/7.3.230 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.230 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.230 +Problem: ":wundo" and ":rundo" don't unescape their argument. (Aaron + Thoma) +Solution: Use FILE1 instead of XFILE. +Files: src/ex_cmds.h + + +*** ../mercurial/vim73/src/ex_cmds.h 2010-08-20 11:09:02.000000000 +0200 +--- src/ex_cmds.h 2011-06-20 04:44:13.000000000 +0200 +*************** +*** 788,794 **** + EX(CMD_rubyfile, "rubyfile", ex_rubyfile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_rundo, "rundo", ex_rundo, +! NEEDARG|EXTRA|XFILE), + EX(CMD_rviminfo, "rviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_substitute, "substitute", do_sub, +--- 788,794 ---- + EX(CMD_rubyfile, "rubyfile", ex_rubyfile, + RANGE|FILE1|NEEDARG|CMDWIN), + EX(CMD_rundo, "rundo", ex_rundo, +! NEEDARG|FILE1), + EX(CMD_rviminfo, "rviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_substitute, "substitute", do_sub, +*************** +*** 1078,1084 **** + EX(CMD_wsverb, "wsverb", ex_wsverb, + EXTRA|NOTADR|NEEDARG), + EX(CMD_wundo, "wundo", ex_wundo, +! BANG|NEEDARG|EXTRA|XFILE), + EX(CMD_wviminfo, "wviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_xit, "xit", ex_exit, +--- 1078,1084 ---- + EX(CMD_wsverb, "wsverb", ex_wsverb, + EXTRA|NOTADR|NEEDARG), + EX(CMD_wundo, "wundo", ex_wundo, +! BANG|NEEDARG|FILE1), + EX(CMD_wviminfo, "wviminfo", ex_viminfo, + BANG|FILE1|TRLBAR|CMDWIN), + EX(CMD_xit, "xit", ex_exit, +*** ../vim-7.3.229/src/version.c 2011-06-20 00:53:10.000000000 +0200 +--- src/version.c 2011-06-20 05:02:40.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 230, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +201. When somebody asks you where you are, you tell them in which chat room. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.231 b/source/ap/vim/patches/7.3.231 new file mode 100644 index 000000000..266d0a2bc --- /dev/null +++ b/source/ap/vim/patches/7.3.231 @@ -0,0 +1,128 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.231 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Note: this is a weird patch, it redoes patches from 7.3.202 and 7.3.203 +that failed when applied as a patch, but the mercurial repository +already had this, thus won't change anything there. + + +Patch 7.3.231 +Problem: Runtime file patches failed. +Solution: Redo the patches made against the patched files instead of the + files in the mercurial repository. +Files: runtime/doc/indent.txt, runtime/doc/os_win32.txt + + +*** ../vim-7.3.230/runtime/doc/indent.txt 2011-05-25 15:16:06.000000000 +0200 +--- runtime/doc/indent.txt 2011-05-31 22:23:39.000000000 +0200 +*************** +*** 356,363 **** + BaseClass(3) BaseClass(3) + {} {} + < +! +N Indent a continuation line (a line that spills onto the next) N +! additional characters. (default 'shiftwidth'). + + cino= cino=+10 > + a = b + 9 * a = b + 9 * +--- 357,368 ---- + BaseClass(3) BaseClass(3) + {} {} + < +! *cino-+* +! +N Indent a continuation line (a line that spills onto the next) +! inside a function N additional characters. (default +! 'shiftwidth'). +! Outside of a function, when the previous line ended in a +! backslash, the 2 * N is used. + + cino= cino=+10 > + a = b + 9 * a = b + 9 * +*************** +*** 509,522 **** +--- 514,532 ---- + } + } + < ++ *cino-)* + )N Vim searches for unclosed parentheses at most N lines away. + This limits the time needed to search for parentheses. (default + 20 lines). + ++ *cino-star* + *N Vim searches for unclosed comments at most N lines away. This + limits the time needed to search for the start of a comment. ++ If your /* */ comments stop indenting afer N lines this is the ++ value you will want to change. + (default 70 lines). + ++ *cino-#* + #N When N is non-zero recognize shell/Perl comments, starting with + '#'. Default N is zero: don't recognizes '#' comments. Note + that lines starting with # will still be seen as preprocessor +*** ../vim-7.3.230/runtime/doc/os_win32.txt 2010-08-15 21:57:16.000000000 +0200 +--- runtime/doc/os_win32.txt 2011-05-28 18:17:58.000000000 +0200 +*************** +*** 313,318 **** +--- 313,349 ---- + with :!start do not get passed Vim's open file handles, which means they do + not have to be closed before Vim. + To avoid this special treatment, use ":! start". ++ There are two optional arguments (see the next Q): ++ /min the window will be minimized. ++ /b" no console window will be opened ++ You can only one of these flags at a time. A second second one will be ++ treated as the start of the command. ++ ++ Q. How do I avoid getting a window for programs that I run asynchronously? ++ A. You have two possible solutions depending on what exactly do you want: ++ 1) You may use the /min flag in order to run program in a minimized state ++ with no other changes. It will work equally for console and GUI ++ applications. ++ 2) You can use the /b flag to run console applications without creating a ++ console window for them (GUI applications are not affected). But you ++ should use this flag only if the application you run doesn't require any ++ input. Otherwise it will get an EOF error because its input stream ++ (stdin) would be redirected to \\.\NUL (stdoud and stderr too). ++ ++ Example for a console application, run Exuberant ctags: > ++ :!start /min ctags -R . ++ < When it has finished you should see file named "tags" in your current ++ directory. You should notice the window title blinking on your taskbar. ++ This is more noticable for commands that take longer. ++ Now delete the "tags" file and run this command: > ++ :!start /b ctags -R . ++ < You should have the same "tags" file, but this time there will be no ++ blinking on the taskbar. ++ Example for a GUI application: > ++ :!start /min notepad ++ :!start /b notepad ++ < The first command runs notepad minimized and the second one runs it ++ normally. + + Q. I'm using Win32s, and when I try to run an external command like "make", + Vim doesn't wait for it to finish! Help! +*** ../vim-7.3.230/src/version.c 2011-06-20 05:02:53.000000000 +0200 +--- src/version.c 2011-06-26 03:14:03.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 231, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +222. You send more than 20 personal e-mails a day. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.232 b/source/ap/vim/patches/7.3.232 new file mode 100644 index 000000000..982d7478c --- /dev/null +++ b/source/ap/vim/patches/7.3.232 @@ -0,0 +1,84 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.232 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.232 +Problem: Python doesn't compile without +multi_byte +Solution: Use "latin1" when MULTI_BYTE is not defined. +Files: src/if_py_both.h + + +*** ../vim-7.3.231/src/if_py_both.h 2011-06-19 00:27:46.000000000 +0200 +--- src/if_py_both.h 2011-06-26 03:58:07.000000000 +0200 +*************** +*** 12,17 **** +--- 12,23 ---- + * Common code for if_python.c and if_python3.c. + */ + ++ #ifdef FEAT_MBYTE ++ # define ENC_OPT p_enc ++ #else ++ # define ENC_OPT "latin1" ++ #endif ++ + /* + * obtain a lock on the Vim data structures + */ +*************** +*** 68,74 **** + char *str = NULL; + int error = ((OutputObject *)(self))->error; + +! if (!PyArg_ParseTuple(args, "es#", p_enc, &str, &len)) + return NULL; + + Py_BEGIN_ALLOW_THREADS +--- 74,80 ---- + char *str = NULL; + int error = ((OutputObject *)(self))->error; + +! if (!PyArg_ParseTuple(args, "es#", ENC_OPT, &str, &len)) + return NULL; + + Py_BEGIN_ALLOW_THREADS +*************** +*** 108,114 **** + char *str = NULL; + PyInt len; + +! if (!PyArg_Parse(line, "es#", p_enc, &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); + Py_DECREF(list); + return NULL; +--- 114,120 ---- + char *str = NULL; + PyInt len; + +! if (!PyArg_Parse(line, "es#", ENC_OPT, &str, &len)) { + PyErr_SetString(PyExc_TypeError, _("writelines() requires list of strings")); + Py_DECREF(list); + return NULL; +*** ../vim-7.3.231/src/version.c 2011-06-26 03:16:58.000000000 +0200 +--- src/version.c 2011-06-26 04:00:40.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 232, + /**/ + +-- +If evolution theories are correct, humans will soon grow a third +hand for operating the mouse. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.233 b/source/ap/vim/patches/7.3.233 new file mode 100644 index 000000000..2dcbf89ac --- /dev/null +++ b/source/ap/vim/patches/7.3.233 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.233 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.233 +Problem: ":scriptnames" and ":breaklist" show long file names. +Solution: Shorten to use "~/" when possible. (Jean-Rene David) +Files: src/ex_cmds2.c + + +*** ../vim-7.3.232/src/ex_cmds2.c 2011-05-19 18:26:34.000000000 +0200 +--- src/ex_cmds2.c 2011-06-26 04:20:24.000000000 +0200 +*************** +*** 682,691 **** + for (i = 0; i < dbg_breakp.ga_len; ++i) + { + bp = &BREAKP(i); + smsg((char_u *)_("%3d %s %s line %ld"), + bp->dbg_nr, + bp->dbg_type == DBG_FUNC ? "func" : "file", +! bp->dbg_name, + (long)bp->dbg_lnum); + } + } +--- 682,693 ---- + for (i = 0; i < dbg_breakp.ga_len; ++i) + { + bp = &BREAKP(i); ++ if (bp->dbg_type == DBG_FILE) ++ home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE); + smsg((char_u *)_("%3d %s %s line %ld"), + bp->dbg_nr, + bp->dbg_type == DBG_FUNC ? "func" : "file", +! bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff, + (long)bp->dbg_lnum); + } + } +*************** +*** 3268,3274 **** + + for (i = 1; i <= script_items.ga_len && !got_int; ++i) + if (SCRIPT_ITEM(i).sn_name != NULL) +! smsg((char_u *)"%3d: %s", i, SCRIPT_ITEM(i).sn_name); + } + + # if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) +--- 3270,3280 ---- + + for (i = 1; i <= script_items.ga_len && !got_int; ++i) + if (SCRIPT_ITEM(i).sn_name != NULL) +! { +! home_replace(NULL, SCRIPT_ITEM(i).sn_name, +! NameBuff, MAXPATHL, TRUE); +! smsg((char_u *)"%3d: %s", i, NameBuff); +! } + } + + # if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) +*** ../vim-7.3.232/src/version.c 2011-06-26 04:01:37.000000000 +0200 +--- src/version.c 2011-06-26 04:23:48.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 233, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +223. You set up a web-cam as your home's security system. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.234 b/source/ap/vim/patches/7.3.234 new file mode 100644 index 000000000..a60df3db1 --- /dev/null +++ b/source/ap/vim/patches/7.3.234 @@ -0,0 +1,178 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.234 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.234 +Problem: With GTK menu may be popping down. +Solution: Use event time instead of GDK_CURRENT_TIME. (Hong Xu) +Files: src/gui.c, src/gui.h, src/gui_gtk.c, src/gui_gtk_x11.c + + +*** ../vim-7.3.233/src/gui.c 2011-06-20 00:53:10.000000000 +0200 +--- src/gui.c 2011-06-26 04:38:09.000000000 +0200 +*************** +*** 84,89 **** +--- 84,93 ---- + gui.starting = TRUE; + full_screen = FALSE; + ++ #ifdef FEAT_GUI_GTK ++ gui.event_time = GDK_CURRENT_TIME; ++ #endif ++ + #ifdef MAY_FORK + if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive) + dofork = FALSE; +*** ../vim-7.3.233/src/gui.h 2011-05-10 16:41:13.000000000 +0200 +--- src/gui.h 2011-06-26 04:41:21.000000000 +0200 +*************** +*** 401,406 **** +--- 401,408 ---- + GtkAccelGroup *accel_group; + GtkWidget *filedlg; /* file selection dialog */ + char_u *browse_fname; /* file name from filedlg */ ++ ++ guint32 event_time; + #endif /* FEAT_GUI_GTK */ + + #if defined(FEAT_GUI_TABLINE) \ +*** ../vim-7.3.233/src/gui_gtk.c 2011-01-17 20:08:03.000000000 +0100 +--- src/gui_gtk.c 2011-06-26 04:38:09.000000000 +0200 +*************** +*** 1391,1397 **** + gtk_menu_popup(GTK_MENU(menu->submenu_id), + NULL, NULL, + (GtkMenuPositionFunc)NULL, NULL, +! 3U, (guint32)GDK_CURRENT_TIME); + } + + /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to +--- 1391,1397 ---- + gtk_menu_popup(GTK_MENU(menu->submenu_id), + NULL, NULL, + (GtkMenuPositionFunc)NULL, NULL, +! 3U, gui.event_time); + } + + /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to +*** ../vim-7.3.233/src/gui_gtk_x11.c 2011-06-19 01:14:22.000000000 +0200 +--- src/gui_gtk_x11.c 2011-06-26 04:39:57.000000000 +0200 +*************** +*** 88,95 **** + # include + #endif + +- static guint32 clipboard_event_time = CurrentTime; +- + /* + * Easy-to-use macro for multihead support. + */ +--- 88,93 ---- +*************** +*** 934,940 **** + guint state; + char_u *s, *d; + +! clipboard_event_time = event->time; + key_sym = event->keyval; + state = event->state; + +--- 932,938 ---- + guint state; + char_u *s, *d; + +! gui.event_time = event->time; + key_sym = event->keyval; + state = event->state; + +*************** +*** 1129,1135 **** + GdkEventKey *event, + gpointer data UNUSED) + { +! clipboard_event_time = event->time; + /* + * GTK+ 2 input methods may do fancy stuff on key release events too. + * With the default IM for instance, you can enter any UCS code point +--- 1127,1133 ---- + GdkEventKey *event, + gpointer data UNUSED) + { +! gui.event_time = event->time; + /* + * GTK+ 2 input methods may do fancy stuff on key release events too. + * With the default IM for instance, you can enter any UCS code point +*************** +*** 1622,1628 **** + int x, y; + int_u vim_modifiers; + +! clipboard_event_time = event->time; + + /* Make sure we have focus now we've been selected */ + if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget)) +--- 1620,1626 ---- + int x, y; + int_u vim_modifiers; + +! gui.event_time = event->time; + + /* Make sure we have focus now we've been selected */ + if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget)) +*************** +*** 1733,1739 **** + int x, y; + int_u vim_modifiers; + +! clipboard_event_time = event->time; + + /* Remove any motion "machine gun" timers used for automatic further + extension of allocation areas if outside of the applications window +--- 1731,1737 ---- + int x, y; + int_u vim_modifiers; + +! gui.event_time = event->time; + + /* Remove any motion "machine gun" timers used for automatic further + extension of allocation areas if outside of the applications window +*************** +*** 5654,5660 **** + int success; + + success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom, +! clipboard_event_time); + gui_mch_update(); + return (success) ? OK : FAIL; + } +--- 5652,5658 ---- + int success; + + success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom, +! gui.event_time); + gui_mch_update(); + return (success) ? OK : FAIL; + } +*** ../vim-7.3.233/src/version.c 2011-06-26 04:25:24.000000000 +0200 +--- src/version.c 2011-06-26 04:47:02.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 234, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +225. You sign up for free subscriptions for all the computer magazines + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.235 b/source/ap/vim/patches/7.3.235 new file mode 100644 index 000000000..a852c852a --- /dev/null +++ b/source/ap/vim/patches/7.3.235 @@ -0,0 +1,360 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.235 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.235 +Problem: ";" gets stuck on a "t" command, it's not useful. +Solution: Add the ';' flag in 'cpo'. (Christian Brabandt) +Files: runtime/doc/motion.txt, runtime/doc/options.txt, src/option.h, + src/search.c src/testdir/test81.in, src/testdir/test81.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + + +*** ../vim-7.3.234/runtime/doc/motion.txt 2010-08-15 21:57:17.000000000 +0200 +--- runtime/doc/motion.txt 2011-06-26 05:15:58.000000000 +0200 +*************** +*** 269,279 **** + {char} can be entered like with the |f| command. + + *;* +! ; Repeat latest f, t, F or T [count] times. + + *,* + , Repeat latest f, t, F or T in opposite direction +! [count] times. + + ============================================================================== + 3. Up-down motions *up-down-motions* +--- 269,279 ---- + {char} can be entered like with the |f| command. + + *;* +! ; Repeat latest f, t, F or T [count] times. See |cpo-;| + + *,* + , Repeat latest f, t, F or T in opposite direction +! [count] times. See also |cpo-;| + + ============================================================================== + 3. Up-down motions *up-down-motions* +*** ../vim-7.3.234/runtime/doc/options.txt 2011-06-12 20:42:17.000000000 +0200 +--- runtime/doc/options.txt 2011-06-26 05:15:58.000000000 +0200 +*************** +*** 2090,2095 **** +--- 2117,2128 ---- + *cpo->* + > When appending to a register, put a line break before + the appended text. ++ *cpo-;* ++ ; When using |,| or |;| to repeat the last |t| search ++ and the cursor is right in front of the searched ++ character, the cursor won't move. When not included, ++ the cursor would skip over it and jump to the ++ following occurence. + + POSIX flags. These are not included in the Vi default value, except + when $VIM_POSIX was set on startup. |posix| +*** ../vim-7.3.234/src/option.h 2011-06-12 22:13:37.000000000 +0200 +--- src/option.h 2011-06-26 05:17:58.000000000 +0200 +*************** +*** 169,178 **** + #define CPO_SUBPERCENT '/' /* % in :s string uses previous one */ + #define CPO_BACKSL '\\' /* \ is not special in [] */ + #define CPO_CHDIR '.' /* don't chdir if buffer is modified */ + /* default values for Vim, Vi and POSIX */ + #define CPO_VIM "aABceFs" +! #define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>" +! #define CPO_ALL "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\." + + /* characters for p_ww option: */ + #define WW_ALL "bshl<>[],~" +--- 169,180 ---- + #define CPO_SUBPERCENT '/' /* % in :s string uses previous one */ + #define CPO_BACKSL '\\' /* \ is not special in [] */ + #define CPO_CHDIR '.' /* don't chdir if buffer is modified */ ++ #define CPO_SCOLON ';' /* using "," and ";" will skip over char if ++ * cursor would not move */ + /* default values for Vim, Vi and POSIX */ + #define CPO_VIM "aABceFs" +! #define CPO_VI "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>;" +! #define CPO_ALL "aAbBcCdDeEfFgHiIjJkKlLmMnoOpPqrRsStuvwWxXyZ$!%*-+<>#{|&/\\.;" + + /* characters for p_ww option: */ + #define WW_ALL "bshl<>[],~" +*** ../vim-7.3.234/src/search.c 2011-05-10 16:41:13.000000000 +0200 +--- src/search.c 2011-06-26 05:20:45.000000000 +0200 +*************** +*** 1546,1551 **** +--- 1546,1552 ---- + int col; + char_u *p; + int len; ++ int stop = TRUE; + #ifdef FEAT_MBYTE + static char_u bytes[MB_MAXBYTES]; + static int bytelen = 1; /* >1 for multi-byte char */ +*************** +*** 1580,1585 **** +--- 1581,1592 ---- + t_cmd = last_t_cmd; + c = lastc; + /* For multi-byte re-use last bytes[] and bytelen. */ ++ ++ /* Force a move of at least one char, so ";" and "," will move the ++ * cursor, even if the cursor is right in front of char we are looking ++ * at. */ ++ if (vim_strchr(p_cpo, CPO_SCOLON) == NULL && count == 1) ++ stop = FALSE; + } + + if (dir == BACKWARD) +*************** +*** 1612,1625 **** + } + if (bytelen == 1) + { +! if (p[col] == c) + break; + } + else + { +! if (vim_memcmp(p + col, bytes, bytelen) == 0) + break; + } + } + } + else +--- 1619,1633 ---- + } + if (bytelen == 1) + { +! if (p[col] == c && stop) + break; + } + else + { +! if (vim_memcmp(p + col, bytes, bytelen) == 0 && stop) + break; + } ++ stop = TRUE; + } + } + else +*************** +*** 1629,1636 **** + { + if ((col += dir) < 0 || col >= len) + return FAIL; +! if (p[col] == c) + break; + } + } + } +--- 1637,1645 ---- + { + if ((col += dir) < 0 || col >= len) + return FAIL; +! if (p[col] == c && stop) + break; ++ stop = TRUE; + } + } + } +*** ../vim-7.3.234/src/testdir/test81.in 2011-06-26 05:34:33.000000000 +0200 +--- src/testdir/test81.in 2011-06-26 05:30:31.000000000 +0200 +*************** +*** 0 **** +--- 1,18 ---- ++ Test for t movement command and 'cpo-;' setting ++ ++ STARTTEST ++ :set nocompatible ++ :set cpo-=; ++ /firstline/ ++ j0tt;D ++ $Ty;D:set cpo+=; ++ j0tt;;D ++ $Ty;;D:?firstline?+1,$w! test.out ++ :qa! ++ ENDTEST ++ ++ firstline ++ aaa two three four ++ bbb yee yoo four ++ ccc two three four ++ ddd yee yoo four +*** ../vim-7.3.234/src/testdir/test81.ok 2011-06-26 05:34:33.000000000 +0200 +--- src/testdir/test81.ok 2011-06-26 05:31:33.000000000 +0200 +*************** +*** 0 **** +--- 1,4 ---- ++ aaa two ++ bbb y ++ ccc ++ ddd yee y +*** ../vim-7.3.234/src/testdir/Makefile 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Makefile 2011-06-26 05:09:56.000000000 +0200 +*************** +*** 26,32 **** + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out + + SCRIPTS_GUI = test16.out + +--- 26,32 ---- + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.3.234/src/testdir/Make_amiga.mak 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_amiga.mak 2011-06-26 05:09:07.000000000 +0200 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out test79.out test80.out + + .SUFFIXES: .in .out + +--- 28,35 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out test79.out test80.out \ +! test81.out + + .SUFFIXES: .in .out + +*************** +*** 128,130 **** +--- 129,132 ---- + test78.out: test78.in + test79.out: test79.in + test80.out: test80.in ++ test81.out: test81.in +*** ../vim-7.3.234/src/testdir/Make_dos.mak 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_dos.mak 2011-06-26 05:09:16.000000000 +0200 +*************** +*** 29,35 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out + + SCRIPTS32 = test50.out test70.out + +--- 29,35 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.234/src/testdir/Make_ming.mak 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_ming.mak 2011-06-26 05:09:24.000000000 +0200 +*************** +*** 49,55 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out + + SCRIPTS32 = test50.out test70.out + +--- 49,55 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.234/src/testdir/Make_os2.mak 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_os2.mak 2011-06-26 05:09:33.000000000 +0200 +*************** +*** 28,34 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out test79.out test80.out + + .SUFFIXES: .in .out + +--- 28,35 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ +! test76.out test77.out test78.out test79.out test80.out \ +! test81.out + + .SUFFIXES: .in .out + +*** ../vim-7.3.234/src/testdir/Make_vms.mms 2011-06-19 04:31:54.000000000 +0200 +--- src/testdir/Make_vms.mms 2011-06-26 05:09:42.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jun 19 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jun 26 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 75,81 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out test79.out test80.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 75,81 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out test79.out test80.out test81.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.234/src/version.c 2011-06-26 04:48:56.000000000 +0200 +--- src/version.c 2011-06-26 05:33:53.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 235, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +226. You sit down at the computer right after dinner and your spouse + says "See you in the morning." + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.236 b/source/ap/vim/patches/7.3.236 new file mode 100644 index 000000000..3be69e302 --- /dev/null +++ b/source/ap/vim/patches/7.3.236 @@ -0,0 +1,87 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.236 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.236 (after 7.3.232) +Problem: Python 3 doesn't compile without +multi_byte +Solution: Use "latin1" when MULTI_BYTE is not defined. (lilydjwg) +Files: src/if_python3.c + + +*** ../vim-7.3.235/src/if_python3.c 2011-06-19 00:27:46.000000000 +0200 +--- src/if_python3.c 2011-06-26 19:10:57.000000000 +0200 +*************** +*** 70,76 **** + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)p_enc, NULL); + #define PyString_FreeBytes(obj) Py_XDECREF(bytes) + #define PyString_AsString(obj) PyBytes_AsString(obj) + #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) +--- 70,76 ---- + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)ENC_OPT, NULL); + #define PyString_FreeBytes(obj) Py_XDECREF(bytes) + #define PyString_AsString(obj) PyBytes_AsString(obj) + #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) +*************** +*** 661,667 **** + + /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause + * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)p_enc, NULL); + cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL); + Py_XDECREF(cmdstr); + PyRun_SimpleString(PyBytes_AsString(cmdbytes)); +--- 661,667 ---- + + /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause + * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)ENC_OPT, NULL); + cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL); + Py_XDECREF(cmdstr); + PyRun_SimpleString(PyBytes_AsString(cmdbytes)); +*************** +*** 1463,1469 **** + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)p_enc, NULL); + + vim_free(tmp); + return result; +--- 1463,1469 ---- + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)ENC_OPT, NULL); + + vim_free(tmp); + return result; +*** ../vim-7.3.235/src/version.c 2011-06-26 05:36:07.000000000 +0200 +--- src/version.c 2011-06-26 19:12:12.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 236, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +228. You spend Saturday night making the counter on your home page + pass that 2000 mark. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.237 b/source/ap/vim/patches/7.3.237 new file mode 100644 index 000000000..ead50ca6a --- /dev/null +++ b/source/ap/vim/patches/7.3.237 @@ -0,0 +1,222 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.237 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.237 +Problem: "filetype" completion doesn't work on Windows. (Yue Wu) +Solution: Don't use a glob pattern for the directories, use a list of + directories. (Dominique Pelle) +Files: src/ex_getln.c + + +*** ../vim-7.3.236/src/ex_getln.c 2011-05-19 18:26:34.000000000 +0200 +--- src/ex_getln.c 2011-06-26 19:36:36.000000000 +0200 +*************** +*** 110,116 **** + static int expand_showtail __ARGS((expand_T *xp)); + #ifdef FEAT_CMDL_COMPL + static int expand_shellcmd __ARGS((char_u *filepat, int *num_file, char_u ***file, int flagsarg)); +! static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname)); + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file)); + static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file)); +--- 110,116 ---- + static int expand_showtail __ARGS((expand_T *xp)); + #ifdef FEAT_CMDL_COMPL + static int expand_shellcmd __ARGS((char_u *filepat, int *num_file, char_u ***file, int flagsarg)); +! static int ExpandRTDir __ARGS((char_u *pat, int *num_file, char_u ***file, char *dirname[])); + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + static int ExpandUserDefined __ARGS((expand_T *xp, regmatch_T *regmatch, int *num_file, char_u ***file)); + static int ExpandUserList __ARGS((expand_T *xp, int *num_file, char_u ***file)); +*************** +*** 4536,4548 **** + || xp->xp_context == EXPAND_TAGS_LISTFILES) + return expand_tags(xp->xp_context == EXPAND_TAGS, pat, num_file, file); + if (xp->xp_context == EXPAND_COLORS) +! return ExpandRTDir(pat, num_file, file, "colors"); + if (xp->xp_context == EXPAND_COMPILER) +! return ExpandRTDir(pat, num_file, file, "compiler"); + if (xp->xp_context == EXPAND_OWNSYNTAX) +! return ExpandRTDir(pat, num_file, file, "syntax"); + if (xp->xp_context == EXPAND_FILETYPE) +! return ExpandRTDir(pat, num_file, file, "{syntax,indent,ftplugin}"); + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + if (xp->xp_context == EXPAND_USER_LIST) + return ExpandUserList(xp, num_file, file); +--- 4536,4560 ---- + || xp->xp_context == EXPAND_TAGS_LISTFILES) + return expand_tags(xp->xp_context == EXPAND_TAGS, pat, num_file, file); + if (xp->xp_context == EXPAND_COLORS) +! { +! char *directories[] = {"colors", NULL}; +! return ExpandRTDir(pat, num_file, file, directories); +! } + if (xp->xp_context == EXPAND_COMPILER) +! { +! char *directories[] = {"colors", NULL}; +! return ExpandRTDir(pat, num_file, file, directories); +! } + if (xp->xp_context == EXPAND_OWNSYNTAX) +! { +! char *directories[] = {"syntax", NULL}; +! return ExpandRTDir(pat, num_file, file, directories); +! } + if (xp->xp_context == EXPAND_FILETYPE) +! { +! char *directories[] = {"syntax", "indent", "ftplugin", NULL}; +! return ExpandRTDir(pat, num_file, file, directories); +! } + # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) + if (xp->xp_context == EXPAND_USER_LIST) + return ExpandUserList(xp, num_file, file); +*************** +*** 4995,5051 **** + /* + * Expand color scheme, compiler or filetype names: + * 'runtimepath'/{dirnames}/{pat}.vim +! * dirnames may contain one directory (ex: "colorscheme") or can be a glob +! * expression matching multiple directories (ex: "{syntax,ftplugin,indent}"). + */ + static int + ExpandRTDir(pat, num_file, file, dirnames) + char_u *pat; + int *num_file; + char_u ***file; +! char *dirnames; + { +! char_u *all; + char_u *s; + char_u *e; + garray_T ga; + + *num_file = 0; + *file = NULL; +! s = alloc((unsigned)(STRLEN(pat) + STRLEN(dirnames) + 7)); +! if (s == NULL) +! return FAIL; +! sprintf((char *)s, "%s/%s*.vim", dirnames, pat); +! all = globpath(p_rtp, s, 0); +! vim_free(s); +! if (all == NULL) +! return FAIL; + +! ga_init2(&ga, (int)sizeof(char *), 3); +! for (s = all; *s != NUL; s = e) + { +! e = vim_strchr(s, '\n'); +! if (e == NULL) +! e = s + STRLEN(s); +! if (ga_grow(&ga, 1) == FAIL) +! break; +! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0) + { +! for (s = e - 4; s > all; mb_ptr_back(all, s)) +! if (*s == '\n' || vim_ispathsep(*s)) +! break; +! ++s; +! ((char_u **)ga.ga_data)[ga.ga_len] = + vim_strnsave(s, (int)(e - s - 4)); +! ++ga.ga_len; + } +! if (*e != NUL) +! ++e; + } +! vim_free(all); + + /* Sort and remove duplicates which can happen when specifying multiple +! * directories in dirnames such as "{syntax,ftplugin,indent}". */ + remove_duplicates(&ga); + + *file = ga.ga_data; +--- 5007,5074 ---- + /* + * Expand color scheme, compiler or filetype names: + * 'runtimepath'/{dirnames}/{pat}.vim +! * "dirnames" is an array with one or more directory names. + */ + static int + ExpandRTDir(pat, num_file, file, dirnames) + char_u *pat; + int *num_file; + char_u ***file; +! char *dirnames[]; + { +! char_u *matches; + char_u *s; + char_u *e; + garray_T ga; ++ int i; ++ int pat_len; + + *num_file = 0; + *file = NULL; +! pat_len = STRLEN(pat); +! ga_init2(&ga, (int)sizeof(char *), 10); + +! for (i = 0; dirnames[i] != NULL; ++i) + { +! s = alloc((unsigned)(STRLEN(dirnames[i]) + pat_len + 7)); +! if (s == NULL) + { +! ga_clear_strings(&ga); +! return FAIL; +! } +! sprintf((char *)s, "%s/%s*.vim", dirnames[i], pat); +! matches = globpath(p_rtp, s, 0); +! vim_free(s); +! if (matches == NULL) +! continue; +! +! for (s = matches; *s != NUL; s = e) +! { +! e = vim_strchr(s, '\n'); +! if (e == NULL) +! e = s + STRLEN(s); +! if (ga_grow(&ga, 1) == FAIL) +! break; +! if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0) +! { +! for (s = e - 4; s > matches; mb_ptr_back(matches, s)) +! if (*s == '\n' || vim_ispathsep(*s)) +! break; +! ++s; +! ((char_u **)ga.ga_data)[ga.ga_len] = + vim_strnsave(s, (int)(e - s - 4)); +! ++ga.ga_len; +! } +! if (*e != NUL) +! ++e; + } +! vim_free(matches); + } +! if (ga.ga_len == 0) +! return FAIL; + + /* Sort and remove duplicates which can happen when specifying multiple +! * directories in dirnames. */ + remove_duplicates(&ga); + + *file = ga.ga_data; +*** ../vim-7.3.236/src/version.c 2011-06-26 19:13:33.000000000 +0200 +--- src/version.c 2011-06-26 19:39:39.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 237, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +230. You spend your Friday nights typing away at your keyboard + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.238 b/source/ap/vim/patches/7.3.238 new file mode 100644 index 000000000..289b1a432 --- /dev/null +++ b/source/ap/vim/patches/7.3.238 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.238 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.238 +Problem: Compiler warning for conversion. +Solution: Add type cast. (Mike Williams) +Files: src/ex_getln.c + + +*** ../vim-7.3.237/src/ex_getln.c 2011-06-26 19:40:14.000000000 +0200 +--- src/ex_getln.c 2011-07-04 14:23:27.000000000 +0200 +*************** +*** 5025,5031 **** + + *num_file = 0; + *file = NULL; +! pat_len = STRLEN(pat); + ga_init2(&ga, (int)sizeof(char *), 10); + + for (i = 0; dirnames[i] != NULL; ++i) +--- 5025,5031 ---- + + *num_file = 0; + *file = NULL; +! pat_len = (int)STRLEN(pat); + ga_init2(&ga, (int)sizeof(char *), 10); + + for (i = 0; dirnames[i] != NULL; ++i) +*** ../vim-7.3.237/src/version.c 2011-06-26 19:40:14.000000000 +0200 +--- src/version.c 2011-07-07 15:04:00.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 238, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +255. You work for a newspaper and your editor asks you to write an + article about Internet addiction...in the "first person." + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.239 b/source/ap/vim/patches/7.3.239 new file mode 100644 index 000000000..1c03da3f6 --- /dev/null +++ b/source/ap/vim/patches/7.3.239 @@ -0,0 +1,321 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.239 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.239 +Problem: Python corrects the cursor column without taking 'virtualedit' + into account. (lilydjwg) +Solution: Call check_cursor_col_win(). +Files: src/if_py_both.h, src/mbyte.c, src/misc2.c, src/normal.c, + src/proto/mbyte.pro, src/proto/misc2.pro + + +*** ../vim-7.3.238/src/if_py_both.h 2011-06-26 04:01:37.000000000 +0200 +--- src/if_py_both.h 2011-07-07 14:28:19.000000000 +0200 +*************** +*** 534,540 **** + { + long lnum; + long col; +- long len; + + if (!PyArg_Parse(val, "(ll)", &lnum, &col)) + return -1; +--- 534,539 ---- +*************** +*** 549,566 **** + if (VimErrorCheck()) + return -1; + +- /* When column is out of range silently correct it. */ +- len = (long)STRLEN(ml_get_buf(this->win->w_buffer, lnum, FALSE)); +- if (col > len) +- col = len; +- + this->win->w_cursor.lnum = lnum; + this->win->w_cursor.col = col; + #ifdef FEAT_VIRTUALEDIT + this->win->w_cursor.coladd = 0; + #endif +! update_screen(VALID); + + return 0; + } + else if (strcmp(name, "height") == 0) +--- 548,562 ---- + if (VimErrorCheck()) + return -1; + + this->win->w_cursor.lnum = lnum; + this->win->w_cursor.col = col; + #ifdef FEAT_VIRTUALEDIT + this->win->w_cursor.coladd = 0; + #endif +! /* When column is out of range silently correct it. */ +! check_cursor_col_win(this->win); + ++ update_screen(VALID); + return 0; + } + else if (strcmp(name, "height") == 0) +*** ../vim-7.3.238/src/mbyte.c 2011-04-11 14:29:13.000000000 +0200 +--- src/mbyte.c 2011-07-07 14:27:07.000000000 +0200 +*************** +*** 3563,3569 **** + void + mb_adjust_cursor() + { +! mb_adjustpos(&curwin->w_cursor); + } + + /* +--- 3563,3569 ---- + void + mb_adjust_cursor() + { +! mb_adjustpos(curbuf, &curwin->w_cursor); + } + + /* +*************** +*** 3571,3577 **** + * If it points to a tail byte it's moved backwards to the head byte. + */ + void +! mb_adjustpos(lp) + pos_T *lp; + { + char_u *p; +--- 3571,3578 ---- + * If it points to a tail byte it's moved backwards to the head byte. + */ + void +! mb_adjustpos(buf, lp) +! buf_T *buf; + pos_T *lp; + { + char_u *p; +*************** +*** 3582,3588 **** + #endif + ) + { +! p = ml_get(lp->lnum); + lp->col -= (*mb_head_off)(p, p + lp->col); + #ifdef FEAT_VIRTUALEDIT + /* Reset "coladd" when the cursor would be on the right half of a +--- 3583,3589 ---- + #endif + ) + { +! p = ml_get_buf(buf, lp->lnum, FALSE); + lp->col -= (*mb_head_off)(p, p + lp->col); + #ifdef FEAT_VIRTUALEDIT + /* Reset "coladd" when the cursor would be on the right half of a +*** ../vim-7.3.238/src/misc2.c 2011-04-11 16:56:29.000000000 +0200 +--- src/misc2.c 2011-07-07 14:27:50.000000000 +0200 +*************** +*** 333,339 **** + #ifdef FEAT_MBYTE + /* prevent from moving onto a trail byte */ + if (has_mbyte) +! mb_adjustpos(pos); + #endif + + if (col < wcol) +--- 333,339 ---- + #ifdef FEAT_MBYTE + /* prevent from moving onto a trail byte */ + if (has_mbyte) +! mb_adjustpos(curbuf, pos); + #endif + + if (col < wcol) +*************** +*** 544,559 **** + void + check_cursor_col() + { + colnr_T len; + #ifdef FEAT_VIRTUALEDIT +! colnr_T oldcol = curwin->w_cursor.col; +! colnr_T oldcoladd = curwin->w_cursor.col + curwin->w_cursor.coladd; + #endif + +! len = (colnr_T)STRLEN(ml_get_curline()); + if (len == 0) +! curwin->w_cursor.col = 0; +! else if (curwin->w_cursor.col >= len) + { + /* Allow cursor past end-of-line when: + * - in Insert mode or restarting Insert mode +--- 544,569 ---- + void + check_cursor_col() + { ++ check_cursor_col_win(curwin); ++ } ++ ++ /* ++ * Make sure win->w_cursor.col is valid. ++ */ ++ void ++ check_cursor_col_win(win) ++ win_T *win; ++ { + colnr_T len; + #ifdef FEAT_VIRTUALEDIT +! colnr_T oldcol = win->w_cursor.col; +! colnr_T oldcoladd = win->w_cursor.col + win->w_cursor.coladd; + #endif + +! len = (colnr_T)STRLEN(ml_get_buf(win->w_buffer, win->w_cursor.lnum, FALSE)); + if (len == 0) +! win->w_cursor.col = 0; +! else if (win->w_cursor.col >= len) + { + /* Allow cursor past end-of-line when: + * - in Insert mode or restarting Insert mode +*************** +*** 567,599 **** + || (ve_flags & VE_ONEMORE) + #endif + || virtual_active()) +! curwin->w_cursor.col = len; + else + { +! curwin->w_cursor.col = len - 1; + #ifdef FEAT_MBYTE +! /* prevent cursor from moving on the trail byte */ + if (has_mbyte) +! mb_adjust_cursor(); + #endif + } + } +! else if (curwin->w_cursor.col < 0) +! curwin->w_cursor.col = 0; + + #ifdef FEAT_VIRTUALEDIT + /* If virtual editing is on, we can leave the cursor on the old position, + * only we must set it to virtual. But don't do it when at the end of the + * line. */ + if (oldcol == MAXCOL) +! curwin->w_cursor.coladd = 0; + else if (ve_flags == VE_ALL) + { +! if (oldcoladd > curwin->w_cursor.col) +! curwin->w_cursor.coladd = oldcoladd - curwin->w_cursor.col; + else + /* avoid weird number when there is a miscalculation or overflow */ +! curwin->w_cursor.coladd = 0; + } + #endif + } +--- 577,609 ---- + || (ve_flags & VE_ONEMORE) + #endif + || virtual_active()) +! win->w_cursor.col = len; + else + { +! win->w_cursor.col = len - 1; + #ifdef FEAT_MBYTE +! /* Move the cursor to the head byte. */ + if (has_mbyte) +! mb_adjustpos(win->w_buffer, &win->w_cursor); + #endif + } + } +! else if (win->w_cursor.col < 0) +! win->w_cursor.col = 0; + + #ifdef FEAT_VIRTUALEDIT + /* If virtual editing is on, we can leave the cursor on the old position, + * only we must set it to virtual. But don't do it when at the end of the + * line. */ + if (oldcol == MAXCOL) +! win->w_cursor.coladd = 0; + else if (ve_flags == VE_ALL) + { +! if (oldcoladd > win->w_cursor.col) +! win->w_cursor.coladd = oldcoladd - win->w_cursor.col; + else + /* avoid weird number when there is a miscalculation or overflow */ +! win->w_cursor.coladd = 0; + } + #endif + } +*** ../vim-7.3.238/src/normal.c 2011-06-20 00:45:55.000000000 +0200 +--- src/normal.c 2011-07-07 14:27:57.000000000 +0200 +*************** +*** 8774,8780 **** + { + --pp->col; + #ifdef FEAT_MBYTE +! mb_adjustpos(pp); + #endif + } + else if (pp->lnum > 1) +--- 8774,8780 ---- + { + --pp->col; + #ifdef FEAT_MBYTE +! mb_adjustpos(curbuf, pp); + #endif + } + else if (pp->lnum > 1) +*** ../vim-7.3.238/src/proto/mbyte.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/mbyte.pro 2011-07-07 14:27:09.000000000 +0200 +*************** +*** 56,62 **** + int utf_valid_string __ARGS((char_u *s, char_u *end)); + int dbcs_screen_tail_off __ARGS((char_u *base, char_u *p)); + void mb_adjust_cursor __ARGS((void)); +! void mb_adjustpos __ARGS((pos_T *lp)); + char_u *mb_prevptr __ARGS((char_u *line, char_u *p)); + int mb_charlen __ARGS((char_u *str)); + int mb_charlen_len __ARGS((char_u *str, int len)); +--- 56,62 ---- + int utf_valid_string __ARGS((char_u *s, char_u *end)); + int dbcs_screen_tail_off __ARGS((char_u *base, char_u *p)); + void mb_adjust_cursor __ARGS((void)); +! void mb_adjustpos __ARGS((buf_T *buf, pos_T *lp)); + char_u *mb_prevptr __ARGS((char_u *line, char_u *p)); + int mb_charlen __ARGS((char_u *str)); + int mb_charlen_len __ARGS((char_u *str, int len)); +*** ../vim-7.3.238/src/proto/misc2.pro 2011-04-11 16:56:29.000000000 +0200 +--- src/proto/misc2.pro 2011-07-07 14:26:57.000000000 +0200 +*************** +*** 14,19 **** +--- 14,20 ---- + linenr_T get_cursor_rel_lnum __ARGS((win_T *wp, linenr_T lnum)); + void check_cursor_lnum __ARGS((void)); + void check_cursor_col __ARGS((void)); ++ void check_cursor_col_win __ARGS((win_T *win)); + void check_cursor __ARGS((void)); + void adjust_cursor_col __ARGS((void)); + int leftcol_changed __ARGS((void)); +*** ../vim-7.3.238/src/version.c 2011-07-07 15:04:38.000000000 +0200 +--- src/version.c 2011-07-07 15:05:49.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 239, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +256. You are able to write down over 250 symptoms of being an internet + addict, even though they only asked for 101. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.240 b/source/ap/vim/patches/7.3.240 new file mode 100644 index 000000000..7048ac1f3 --- /dev/null +++ b/source/ap/vim/patches/7.3.240 @@ -0,0 +1,795 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.240 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Note: I haven't verified this works or even compiles. Please send me a +patch if you see a problem and can fix it. + +Patch 7.3.240 +Problem: External commands can't use pipes on MS-Windows. +Solution: Implement pipes and use them when 'shelltemp' isn't set. (Vincent + Berthoux) +Files: src/eval.c, src/ex_cmds.c, src/misc2.c, src/os_unix.c, + src/os_win32.c, src/proto/misc2.pro, src/ui.c + + +*** ../vim-7.3.239/src/eval.c 2011-06-19 02:55:32.000000000 +0200 +--- src/eval.c 2011-07-07 15:44:56.000000000 +0200 +*************** +*** 11931,11937 **** + #ifdef FEAT_SEARCHPATH + "file_in_path", + #endif +! #if defined(UNIX) && !defined(USE_SYSTEM) + "filterpipe", + #endif + #ifdef FEAT_FIND_ID +--- 11931,11937 ---- + #ifdef FEAT_SEARCHPATH + "file_in_path", + #endif +! #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) + "filterpipe", + #endif + #ifdef FEAT_FIND_ID +*** ../vim-7.3.239/src/ex_cmds.c 2011-06-12 22:03:15.000000000 +0200 +--- src/ex_cmds.c 2011-07-07 15:44:56.000000000 +0200 +*************** +*** 1107,1113 **** + if (do_out) + shell_flags |= SHELL_DOOUT; + +! #if !defined(USE_SYSTEM) && defined(UNIX) + if (!do_in && do_out && !p_stmp) + { + /* Use a pipe to fetch stdout of the command, do not use a temp file. */ +--- 1107,1113 ---- + if (do_out) + shell_flags |= SHELL_DOOUT; + +! #if (!defined(USE_SYSTEM) && defined(UNIX)) || defined(WIN3264) + if (!do_in && do_out && !p_stmp) + { + /* Use a pipe to fetch stdout of the command, do not use a temp file. */ +*** ../vim-7.3.239/src/misc2.c 2011-07-07 15:08:53.000000000 +0200 +--- src/misc2.c 2011-07-07 15:55:42.000000000 +0200 +*************** +*** 2146,2151 **** +--- 2146,2170 ---- + } + } + ++ #if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264) ++ /* ++ * Append the text in "gap" below the cursor line and clear "gap". ++ */ ++ void ++ append_ga_line(gap) ++ garray_T *gap; ++ { ++ /* Remove trailing CR. */ ++ if (gap->ga_len > 0 ++ && !curbuf->b_p_bin ++ && ((char_u *)gap->ga_data)[gap->ga_len - 1] == CAR) ++ --gap->ga_len; ++ ga_append(gap, NUL); ++ ml_append(curwin->w_cursor.lnum++, gap->ga_data, 0, FALSE); ++ gap->ga_len = 0; ++ } ++ #endif ++ + /************************************************************************ + * functions that use lookup tables for various things, generally to do with + * special key codes. +*** ../vim-7.3.239/src/os_unix.c 2011-04-11 16:56:29.000000000 +0200 +--- src/os_unix.c 2011-07-07 15:54:58.000000000 +0200 +*************** +*** 3660,3686 **** + /* Nothing to do. */ + } + +- #ifndef USE_SYSTEM +- static void append_ga_line __ARGS((garray_T *gap)); +- +- /* +- * Append the text in "gap" below the cursor line and clear "gap". +- */ +- static void +- append_ga_line(gap) +- garray_T *gap; +- { +- /* Remove trailing CR. */ +- if (gap->ga_len > 0 +- && !curbuf->b_p_bin +- && ((char_u *)gap->ga_data)[gap->ga_len - 1] == CAR) +- --gap->ga_len; +- ga_append(gap, NUL); +- ml_append(curwin->w_cursor.lnum++, gap->ga_data, 0, FALSE); +- gap->ga_len = 0; +- } +- #endif +- + int + mch_call_shell(cmd, options) + char_u *cmd; +--- 3660,3665 ---- +*** ../vim-7.3.239/src/os_win32.c 2011-05-25 17:06:16.000000000 +0200 +--- src/os_win32.c 2011-07-07 16:08:30.000000000 +0200 +*************** +*** 417,422 **** +--- 417,427 ---- + static PGNSECINFO pGetNamedSecurityInfo; + #endif + ++ typedef BOOL (WINAPI *PSETHANDLEINFORMATION)(HANDLE, DWORD, DWORD); ++ ++ static BOOL allowPiping = FALSE; ++ static PSETHANDLEINFORMATION pSetHandleInformation; ++ + /* + * Set g_PlatformId to VER_PLATFORM_WIN32_NT (NT) or + * VER_PLATFORM_WIN32_WINDOWS (Win95). +*************** +*** 467,472 **** +--- 472,489 ---- + } + } + #endif ++ /* ++ * If we are on windows NT, try to load the pipe functions, only ++ * available from Win2K. ++ */ ++ if (g_PlatformId == VER_PLATFORM_WIN32_NT) ++ { ++ HANDLE kernel32 = GetModuleHandle("kernel32"); ++ pSetHandleInformation = (PSETHANDLEINFORMATION)GetProcAddress( ++ kernel32, "SetHandleInformation"); ++ ++ allowPiping = pSetHandleInformation != NULL; ++ } + done = TRUE; + } + } +*************** +*** 1635,1641 **** + } + + #if ((defined(__MINGW32__) || defined (__CYGWIN32__)) && \ +! __MSVCRT_VERSION__ >= 0x800) || (defined(_MSC_VER) && _MSC_VER >= 1400) + /* + * Bad parameter handler. + * +--- 1652,1658 ---- + } + + #if ((defined(__MINGW32__) || defined (__CYGWIN32__)) && \ +! __MSVCRT_VERSION__ >= 0x800) || (defined(_MSC_VER) && _MSC_VER >= 1400) + /* + * Bad parameter handler. + * +*************** +*** 3210,3216 **** + * 4. Prompt the user to press a key to close the console window + */ + static int +! mch_system(char *cmd, int options) + { + STARTUPINFO si; + PROCESS_INFORMATION pi; +--- 3227,3233 ---- + * 4. Prompt the user to press a key to close the console window + */ + static int +! mch_system_classic(char *cmd, int options) + { + STARTUPINFO si; + PROCESS_INFORMATION pi; +*************** +*** 3315,3320 **** +--- 3332,3829 ---- + + return ret; + } ++ ++ /* ++ * Thread launched by the gui to send the current buffer data to the ++ * process. This way avoid to hang up vim totally if the children ++ * process take a long time to process the lines. ++ */ ++ static DWORD WINAPI ++ sub_process_writer(LPVOID param) ++ { ++ HANDLE g_hChildStd_IN_Wr = param; ++ linenr_T lnum = curbuf->b_op_start.lnum; ++ DWORD len = 0; ++ DWORD l; ++ char_u *lp = ml_get(lnum); ++ char_u *s; ++ int written = 0; ++ ++ for (;;) ++ { ++ l = (DWORD)STRLEN(lp + written); ++ if (l == 0) ++ len = 0; ++ else if (lp[written] == NL) ++ { ++ /* NL -> NUL translation */ ++ WriteFile(g_hChildStd_IN_Wr, "", 1, &len, NULL); ++ } ++ else ++ { ++ s = vim_strchr(lp + written, NL); ++ WriteFile(g_hChildStd_IN_Wr, (char *)lp + written, ++ s == NULL ? l : (DWORD)(s - (lp + written)), ++ &len, NULL); ++ } ++ if (len == (int)l) ++ { ++ /* Finished a line, add a NL, unless this line should not have ++ * one. */ ++ if (lnum != curbuf->b_op_end.lnum ++ || !curbuf->b_p_bin ++ || (lnum != curbuf->b_no_eol_lnum ++ && (lnum != curbuf->b_ml.ml_line_count ++ || curbuf->b_p_eol))) ++ { ++ WriteFile(g_hChildStd_IN_Wr, "\n", 1, &ignored, NULL); ++ } ++ ++ ++lnum; ++ if (lnum > curbuf->b_op_end.lnum) ++ break; ++ ++ lp = ml_get(lnum); ++ written = 0; ++ } ++ else if (len > 0) ++ written += len; ++ } ++ ++ /* finished all the lines, close pipe */ ++ CloseHandle(g_hChildStd_IN_Wr); ++ ExitThread(0); ++ } ++ ++ ++ # define BUFLEN 100 /* length for buffer, stolen from unix version */ ++ ++ /* ++ * This function read from the children's stdout and write the ++ * data on screen or in the buffer accordingly. ++ */ ++ static void ++ dump_pipe(int options, ++ HANDLE g_hChildStd_OUT_Rd, ++ garray_T *ga, ++ char_u buffer[], ++ DWORD *buffer_off) ++ { ++ DWORD availableBytes = 0; ++ DWORD i; ++ int c; ++ char_u *p; ++ int ret; ++ DWORD len; ++ DWORD toRead; ++ int repeatCount; ++ ++ /* we query the pipe to see if there is any data to read ++ * to avoid to perform a blocking read */ ++ ret = PeekNamedPipe(g_hChildStd_OUT_Rd, /* pipe to query */ ++ NULL, /* optional buffer */ ++ 0, /* buffe size */ ++ NULL, /* number of read bytes */ ++ &availableBytes, /* available bytes total */ ++ NULL); /* byteLeft */ ++ ++ repeatCount = 0; ++ /* We got real data in the pipe, read it */ ++ while (ret != 0 && availableBytes > 0 && availableBytes > 0) ++ { ++ repeatCount++; ++ toRead = ++ # ifdef FEAT_MBYTE ++ (DWORD)(BUFLEN - *buffer_off); ++ # else ++ (DWORD)BUFLEN; ++ # endif ++ toRead = availableBytes < toRead ? availableBytes : toRead; ++ ReadFile(g_hChildStd_OUT_Rd, buffer ++ # ifdef FEAT_MBYTE ++ + *buffer_off, toRead ++ # else ++ , toRead ++ # endif ++ , &len, NULL); ++ ++ /* If we haven't read anything, there is a problem */ ++ if (len == 0) ++ break; ++ ++ availableBytes -= len; ++ ++ if (options & SHELL_READ) ++ { ++ /* Do NUL -> NL translation, append NL separated ++ * lines to the current buffer. */ ++ for (i = 0; i < len; ++i) ++ { ++ if (buffer[i] == NL) ++ append_ga_line(ga); ++ else if (buffer[i] == NUL) ++ ga_append(ga, NL); ++ else ++ ga_append(ga, buffer[i]); ++ } ++ } ++ # ifdef FEAT_MBYTE ++ else if (has_mbyte) ++ { ++ int l; ++ ++ len += *buffer_off; ++ buffer[len] = NUL; ++ ++ /* Check if the last character in buffer[] is ++ * incomplete, keep these bytes for the next ++ * round. */ ++ for (p = buffer; p < buffer + len; p += l) ++ { ++ l = mb_cptr2len(p); ++ if (l == 0) ++ l = 1; /* NUL byte? */ ++ else if (MB_BYTE2LEN(*p) != l) ++ break; ++ } ++ if (p == buffer) /* no complete character */ ++ { ++ /* avoid getting stuck at an illegal byte */ ++ if (len >= 12) ++ ++p; ++ else ++ { ++ *buffer_off = len; ++ return; ++ } ++ } ++ c = *p; ++ *p = NUL; ++ msg_puts(buffer); ++ if (p < buffer + len) ++ { ++ *p = c; ++ *buffer_off = (DWORD)((buffer + len) - p); ++ mch_memmove(buffer, p, *buffer_off); ++ return; ++ } ++ *buffer_off = 0; ++ } ++ # endif /* FEAT_MBYTE */ ++ else ++ { ++ buffer[len] = NUL; ++ msg_puts(buffer); ++ } ++ ++ windgoto(msg_row, msg_col); ++ cursor_on(); ++ out_flush(); ++ } ++ } ++ ++ /* ++ * Version of system to use for windows NT > 5.0 (Win2K), use pipe ++ * for communication and doesn't open any new window. ++ */ ++ static int ++ mch_system_piped(char *cmd, int options) ++ { ++ STARTUPINFO si; ++ PROCESS_INFORMATION pi; ++ DWORD ret = 0; ++ ++ HANDLE g_hChildStd_IN_Rd = NULL; ++ HANDLE g_hChildStd_IN_Wr = NULL; ++ HANDLE g_hChildStd_OUT_Rd = NULL; ++ HANDLE g_hChildStd_OUT_Wr = NULL; ++ ++ char_u buffer[BUFLEN + 1]; /* reading buffer + size */ ++ DWORD len; ++ ++ /* buffer used to receive keys */ ++ char_u ta_buf[BUFLEN + 1]; /* TypeAHead */ ++ int ta_len = 0; /* valid bytes in ta_buf[] */ ++ ++ DWORD i; ++ int c; ++ int noread_cnt = 0; ++ garray_T ga; ++ int delay = 1; ++ # ifdef FEAT_MBYTE ++ DWORD buffer_off = 0; /* valid bytes in buffer[] */ ++ # endif ++ ++ SECURITY_ATTRIBUTES saAttr; ++ ++ /* Set the bInheritHandle flag so pipe handles are inherited. */ ++ saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); ++ saAttr.bInheritHandle = TRUE; ++ saAttr.lpSecurityDescriptor = NULL; ++ ++ if ( ! CreatePipe(&g_hChildStd_OUT_Rd, &g_hChildStd_OUT_Wr, &saAttr, 0) ++ /* Ensure the read handle to the pipe for STDOUT is not inherited. */ ++ || ! pSetHandleInformation(g_hChildStd_OUT_Rd, HANDLE_FLAG_INHERIT, 0) ++ /* Create a pipe for the child process's STDIN. */ ++ || ! CreatePipe(&g_hChildStd_IN_Rd, &g_hChildStd_IN_Wr, &saAttr, 0) ++ /* Ensure the write handle to the pipe for STDIN is not inherited. */ ++ || ! pSetHandleInformation(g_hChildStd_IN_Wr, HANDLE_FLAG_INHERIT, 0) ) ++ { ++ CloseHandle(g_hChildStd_IN_Rd); ++ CloseHandle(g_hChildStd_IN_Wr); ++ CloseHandle(g_hChildStd_OUT_Rd); ++ CloseHandle(g_hChildStd_OUT_Wr); ++ MSG_PUTS(_("\nCannot create pipes\n")); ++ } ++ ++ si.cb = sizeof(si); ++ si.lpReserved = NULL; ++ si.lpDesktop = NULL; ++ si.lpTitle = NULL; ++ si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES; ++ ++ /* set-up our file redirection */ ++ si.hStdError = g_hChildStd_OUT_Wr; ++ si.hStdOutput = g_hChildStd_OUT_Wr; ++ si.hStdInput = g_hChildStd_IN_Rd; ++ si.wShowWindow = SW_HIDE; ++ si.cbReserved2 = 0; ++ si.lpReserved2 = NULL; ++ ++ if (options & SHELL_READ) ++ ga_init2(&ga, 1, BUFLEN); ++ ++ /* Now, run the command */ ++ CreateProcess(NULL, /* Executable name */ ++ cmd, /* Command to execute */ ++ NULL, /* Process security attributes */ ++ NULL, /* Thread security attributes */ ++ ++ // this command can be litigeous, handle inheritence was ++ // deactivated for pending temp file, but, if we deactivate ++ // it, the pipes don't work for some reason. ++ TRUE, /* Inherit handles, first deactivated, ++ * but needed */ ++ CREATE_DEFAULT_ERROR_MODE, /* Creation flags */ ++ NULL, /* Environment */ ++ NULL, /* Current directory */ ++ &si, /* Startup information */ ++ &pi); /* Process information */ ++ ++ ++ /* Close our unused side of the pipes */ ++ CloseHandle(g_hChildStd_IN_Rd); ++ CloseHandle(g_hChildStd_OUT_Wr); ++ ++ if (options & SHELL_WRITE) ++ { ++ HANDLE thread = ++ CreateThread(NULL, /* security attributes */ ++ 0, /* default stack size */ ++ sub_process_writer, /* function to be executed */ ++ g_hChildStd_IN_Wr, /* parameter */ ++ 0, /* creation flag, start immediately */ ++ NULL); /* we don't care about thread id */ ++ CloseHandle(thread); ++ g_hChildStd_IN_Wr = NULL; ++ } ++ ++ /* Keep updating the window while waiting for the shell to finish. */ ++ for (;;) ++ { ++ MSG msg; ++ ++ if (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) ++ { ++ TranslateMessage(&msg); ++ DispatchMessage(&msg); ++ } ++ ++ /* write pipe information in the window */ ++ if ((options & (SHELL_READ|SHELL_WRITE)) ++ # ifdef FEAT_GUI ++ || gui.in_use ++ # endif ++ ) ++ { ++ len = 0; ++ if (!(options & SHELL_EXPAND) ++ && ((options & ++ (SHELL_READ|SHELL_WRITE|SHELL_COOKED)) ++ != (SHELL_READ|SHELL_WRITE|SHELL_COOKED) ++ # ifdef FEAT_GUI ++ || gui.in_use ++ # endif ++ ) ++ && (ta_len > 0 || noread_cnt > 4)) ++ { ++ if (ta_len == 0) ++ { ++ /* Get extra characters when we don't have any. Reset the ++ * counter and timer. */ ++ noread_cnt = 0; ++ # if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) ++ gettimeofday(&start_tv, NULL); ++ # endif ++ len = ui_inchar(ta_buf, BUFLEN, 10L, 0); ++ } ++ if (ta_len > 0 || len > 0) ++ { ++ /* ++ * For pipes: Check for CTRL-C: send interrupt signal to ++ * child. Check for CTRL-D: EOF, close pipe to child. ++ */ ++ if (len == 1 && cmd != NULL) ++ { ++ if (ta_buf[ta_len] == Ctrl_C) ++ { ++ /* Learn what exit code is expected, for ++ * now put 9 as SIGKILL */ ++ TerminateProcess(pi.hProcess, 9); ++ } ++ if (ta_buf[ta_len] == Ctrl_D) ++ { ++ CloseHandle(g_hChildStd_IN_Wr); ++ g_hChildStd_IN_Wr = NULL; ++ } ++ } ++ ++ /* replace K_BS by and K_DEL by */ ++ for (i = ta_len; i < ta_len + len; ++i) ++ { ++ if (ta_buf[i] == CSI && len - i > 2) ++ { ++ c = TERMCAP2KEY(ta_buf[i + 1], ta_buf[i + 2]); ++ if (c == K_DEL || c == K_KDEL || c == K_BS) ++ { ++ mch_memmove(ta_buf + i + 1, ta_buf + i + 3, ++ (size_t)(len - i - 2)); ++ if (c == K_DEL || c == K_KDEL) ++ ta_buf[i] = DEL; ++ else ++ ta_buf[i] = Ctrl_H; ++ len -= 2; ++ } ++ } ++ else if (ta_buf[i] == '\r') ++ ta_buf[i] = '\n'; ++ # ifdef FEAT_MBYTE ++ if (has_mbyte) ++ i += (*mb_ptr2len_len)(ta_buf + i, ++ ta_len + len - i) - 1; ++ # endif ++ } ++ ++ /* ++ * For pipes: echo the typed characters. For a pty this ++ * does not seem to work. ++ */ ++ for (i = ta_len; i < ta_len + len; ++i) ++ { ++ if (ta_buf[i] == '\n' || ta_buf[i] == '\b') ++ msg_putchar(ta_buf[i]); ++ # ifdef FEAT_MBYTE ++ else if (has_mbyte) ++ { ++ int l = (*mb_ptr2len)(ta_buf + i); ++ ++ msg_outtrans_len(ta_buf + i, l); ++ i += l - 1; ++ } ++ # endif ++ else ++ msg_outtrans_len(ta_buf + i, 1); ++ } ++ windgoto(msg_row, msg_col); ++ out_flush(); ++ ++ ta_len += len; ++ ++ /* ++ * Write the characters to the child, unless EOF has been ++ * typed for pipes. Write one character at a time, to ++ * avoid losing too much typeahead. When writing buffer ++ * lines, drop the typed characters (only check for ++ * CTRL-C). ++ */ ++ if (options & SHELL_WRITE) ++ ta_len = 0; ++ else if (g_hChildStd_IN_Wr != NULL) ++ { ++ WriteFile(g_hChildStd_IN_Wr, (char*)ta_buf, ++ 1, &len, NULL); ++ // if we are typing in, we want to keep things reactive ++ delay = 1; ++ if (len > 0) ++ { ++ ta_len -= len; ++ mch_memmove(ta_buf, ta_buf + len, ta_len); ++ } ++ } ++ } ++ } ++ } ++ ++ if (ta_len) ++ ui_inchar_undo(ta_buf, ta_len); ++ ++ if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT) ++ { ++ dump_pipe(options, g_hChildStd_OUT_Rd, ++ &ga, buffer, &buffer_off); ++ break; ++ } ++ ++ ++noread_cnt; ++ dump_pipe(options, g_hChildStd_OUT_Rd, ++ &ga, buffer, &buffer_off); ++ ++ /* We start waiting for a very short time and then increase it, so ++ * that we respond quickly when the process is quick, and don't ++ * consume too much overhead when it's slow. */ ++ if (delay < 50) ++ delay += 10; ++ } ++ ++ /* Close the pipe */ ++ CloseHandle(g_hChildStd_OUT_Rd); ++ if (g_hChildStd_IN_Wr != NULL) ++ CloseHandle(g_hChildStd_IN_Wr); ++ ++ WaitForSingleObject(pi.hProcess, INFINITE); ++ ++ /* Get the command exit code */ ++ GetExitCodeProcess(pi.hProcess, &ret); ++ ++ if (options & SHELL_READ) ++ { ++ if (ga.ga_len > 0) ++ { ++ append_ga_line(&ga); ++ /* remember that the NL was missing */ ++ curbuf->b_no_eol_lnum = curwin->w_cursor.lnum; ++ } ++ else ++ curbuf->b_no_eol_lnum = 0; ++ ga_clear(&ga); ++ } ++ ++ /* Close the handles to the subprocess, so that it goes away */ ++ CloseHandle(pi.hThread); ++ CloseHandle(pi.hProcess); ++ ++ return ret; ++ } ++ ++ static int ++ mch_system(char *cmd, int options) ++ { ++ /* if we can pipe and the shelltemp option is off */ ++ if (allowPiping && !p_stmp) ++ return mch_system_piped(cmd, options); ++ else ++ return mch_system_classic(cmd, options); ++ } + #else + + # define mch_system(c, o) system(c) +*************** +*** 3388,3394 **** + char_u *newcmd; + long_u cmdlen = ( + #ifdef FEAT_GUI_W32 +! STRLEN(vimrun_path) + + #endif + STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10); + +--- 3897,3903 ---- + char_u *newcmd; + long_u cmdlen = ( + #ifdef FEAT_GUI_W32 +! (allowPiping && !p_stmp ? 0 : STRLEN(vimrun_path)) + + #endif + STRLEN(p_sh) + STRLEN(p_shcf) + STRLEN(cmd) + 10); + +*************** +*** 3497,3503 **** + MB_ICONWARNING); + need_vimrun_warning = FALSE; + } +! if (!s_dont_use_vimrun) + /* Use vimrun to execute the command. It opens a console + * window, which can be closed without killing Vim. */ + vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s", +--- 4006,4012 ---- + MB_ICONWARNING); + need_vimrun_warning = FALSE; + } +! if (!s_dont_use_vimrun && (!allowPiping || p_stmp)) + /* Use vimrun to execute the command. It opens a console + * window, which can be closed without killing Vim. */ + vim_snprintf((char *)newcmd, cmdlen, "%s%s%s %s %s", +*************** +*** 3521,3527 **** + /* Print the return value, unless "vimrun" was used. */ + if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent + #if defined(FEAT_GUI_W32) +! && ((options & SHELL_DOOUT) || s_dont_use_vimrun) + #endif + ) + { +--- 4030,4037 ---- + /* Print the return value, unless "vimrun" was used. */ + if (x != 0 && !(options & SHELL_SILENT) && !emsg_silent + #if defined(FEAT_GUI_W32) +! && ((options & SHELL_DOOUT) || s_dont_use_vimrun +! || (allowPiping && !p_stmp)) + #endif + ) + { +*** ../vim-7.3.239/src/proto/misc2.pro 2011-07-07 15:08:53.000000000 +0200 +--- src/proto/misc2.pro 2011-07-07 15:56:16.000000000 +0200 +*************** +*** 58,63 **** +--- 58,64 ---- + char_u *ga_concat_strings __ARGS((garray_T *gap)); + void ga_concat __ARGS((garray_T *gap, char_u *s)); + void ga_append __ARGS((garray_T *gap, int c)); ++ void append_ga_line __ARGS((garray_T *gap)); + int name_to_mod_mask __ARGS((int c)); + int simplify_key __ARGS((int key, int *modifiers)); + int handle_x_keys __ARGS((int key)); +*** ../vim-7.3.239/src/ui.c 2011-06-19 01:14:23.000000000 +0200 +--- src/ui.c 2011-07-07 15:44:56.000000000 +0200 +*************** +*** 58,64 **** + #endif + } + +! #if defined(UNIX) || defined(VMS) || defined(PROTO) + /* + * When executing an external program, there may be some typed characters that + * are not consumed by it. Give them back to ui_inchar() and they are stored +--- 58,64 ---- + #endif + } + +! #if defined(UNIX) || defined(VMS) || defined(PROTO) || defined(WIN3264) + /* + * When executing an external program, there may be some typed characters that + * are not consumed by it. Give them back to ui_inchar() and they are stored +*** ../vim-7.3.239/src/version.c 2011-07-07 15:08:53.000000000 +0200 +--- src/version.c 2011-07-07 16:14:20.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 240, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +257. Your "hundred-and-one" lists include well over 101 items, since you + automatically interpret all numbers in hexadecimal notation. + (hex 101 = decimal 257) + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.241 b/source/ap/vim/patches/7.3.241 new file mode 100644 index 000000000..3b73c4de1 --- /dev/null +++ b/source/ap/vim/patches/7.3.241 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.241 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.241 +Problem: Using CTRL-R CTRL-W on the command line may insert only part of + the word. +Solution: Use the cursor position instead of assuming it is at the end of + the command. (Tyru) +Files: src/ex_getln.c + + +*** ../vim-7.3.240/src/ex_getln.c 2011-07-07 15:04:38.000000000 +0200 +--- src/ex_getln.c 2011-07-07 16:38:50.000000000 +0200 +*************** +*** 3046,3052 **** + int len; + + /* Locate start of last word in the cmd buffer. */ +! for (w = ccline.cmdbuff + ccline.cmdlen; w > ccline.cmdbuff; ) + { + #ifdef FEAT_MBYTE + if (has_mbyte) +--- 3046,3052 ---- + int len; + + /* Locate start of last word in the cmd buffer. */ +! for (w = ccline.cmdbuff + ccline.cmdpos; w > ccline.cmdbuff; ) + { + #ifdef FEAT_MBYTE + if (has_mbyte) +*************** +*** 3064,3070 **** + --w; + } + } +! len = (int)((ccline.cmdbuff + ccline.cmdlen) - w); + if (p_ic ? STRNICMP(w, arg, len) == 0 : STRNCMP(w, arg, len) == 0) + p += len; + } +--- 3064,3070 ---- + --w; + } + } +! len = (int)((ccline.cmdbuff + ccline.cmdpos) - w); + if (p_ic ? STRNICMP(w, arg, len) == 0 : STRNCMP(w, arg, len) == 0) + p += len; + } +*** ../vim-7.3.240/src/version.c 2011-07-07 16:20:45.000000000 +0200 +--- src/version.c 2011-07-07 16:41:29.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 241, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +258. When you want to see your girlfriend, you surf to her homepage. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.242 b/source/ap/vim/patches/7.3.242 new file mode 100644 index 000000000..0cf4db920 --- /dev/null +++ b/source/ap/vim/patches/7.3.242 @@ -0,0 +1,71 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.242 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.242 +Problem: Illegal memory access in after_pathsep(). +Solution: Check that the pointer is not at the start of the file name. + (Dominique Pelle) +Files: src/misc2.c + + +*** ../vim-7.3.241/src/misc2.c 2011-07-07 16:20:45.000000000 +0200 +--- src/misc2.c 2011-07-07 17:05:41.000000000 +0200 +*************** +*** 3247,3253 **** + #if defined(FEAT_MBYTE) || defined(PROTO) + /* + * Return TRUE if "p" points to just after a path separator. +! * Take care of multi-byte characters. + * "b" must point to the start of the file name + */ + int +--- 3247,3253 ---- + #if defined(FEAT_MBYTE) || defined(PROTO) + /* + * Return TRUE if "p" points to just after a path separator. +! * Takes care of multi-byte characters. + * "b" must point to the start of the file name + */ + int +*************** +*** 3255,3261 **** + char_u *b; + char_u *p; + { +! return vim_ispathsep(p[-1]) + && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0); + } + #endif +--- 3255,3261 ---- + char_u *b; + char_u *p; + { +! return p > b && vim_ispathsep(p[-1]) + && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0); + } + #endif +*** ../vim-7.3.241/src/version.c 2011-07-07 16:44:33.000000000 +0200 +--- src/version.c 2011-07-07 17:05:49.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 242, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +260. Co-workers have to E-mail you about the fire alarm to get + you out of the building. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.243 b/source/ap/vim/patches/7.3.243 new file mode 100644 index 000000000..f1f913d48 --- /dev/null +++ b/source/ap/vim/patches/7.3.243 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.243 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.243 +Problem: Illegal memory access in readline(). +Solution: Swap the conditions. (Dominique Pelle) +Files: src/eval.c + + +*** ../vim-7.3.242/src/eval.c 2011-07-07 16:20:45.000000000 +0200 +--- src/eval.c 2011-07-07 17:32:16.000000000 +0200 +*************** +*** 14318,14324 **** + tolist = 0; + for ( ; filtd < buflen || readlen <= 0; ++filtd) + { +! if (buf[filtd] == '\n' || readlen <= 0) + { + /* In binary mode add an empty list item when the last + * non-empty line ends in a '\n'. */ +--- 14318,14324 ---- + tolist = 0; + for ( ; filtd < buflen || readlen <= 0; ++filtd) + { +! if (readlen <= 0 || buf[filtd] == '\n') + { + /* In binary mode add an empty list item when the last + * non-empty line ends in a '\n'. */ +*** ../vim-7.3.242/src/version.c 2011-07-07 17:15:29.000000000 +0200 +--- src/version.c 2011-07-07 17:32:30.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 243, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +261. You find diskettes in your pockets when doing laundry. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.244 b/source/ap/vim/patches/7.3.244 new file mode 100644 index 000000000..4cff94f2f --- /dev/null +++ b/source/ap/vim/patches/7.3.244 @@ -0,0 +1,48 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.244 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.244 +Problem: MS-Windows: Build problem with old compiler. (John Beckett) +Solution: Only use HandleToLong() when available. (Mike Williams) +Files: src/gui_w32.c + + +*** ../vim-7.3.243/src/gui_w32.c 2011-05-25 21:18:02.000000000 +0200 +--- src/gui_w32.c 2011-07-07 17:42:36.000000000 +0200 +*************** +*** 1574,1579 **** +--- 1574,1583 ---- + #endif + + #ifdef FEAT_EVAL ++ # if _MSC_VER < 1400 ++ /* HandleToLong() only exists in compilers that can do 64 bit builds */ ++ # define HandleToLong(h) ((long)(h)) ++ # endif + /* set the v:windowid variable */ + set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd)); + #endif +*** ../vim-7.3.243/src/version.c 2011-07-07 17:36:52.000000000 +0200 +--- src/version.c 2011-07-07 17:43:21.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 244, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +262. Your computer has it's own phone line - but your daughter doesn't. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.245 b/source/ap/vim/patches/7.3.245 new file mode 100644 index 000000000..b05fe433a --- /dev/null +++ b/source/ap/vim/patches/7.3.245 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.245 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.245 +Problem: Python 3.2 libraries not correctly detected. +Solution: Add the suffix to the library name. (Niclas Zeising) +Files: src/auto/configure, src/configure.in + + +*** ../vim-7.3.244/src/auto/configure 2011-06-13 01:32:42.000000000 +0200 +--- src/auto/configure 2011-07-13 17:57:05.000000000 +0200 +*************** +*** 5611,5617 **** + eof + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" +! vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" + vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +--- 5611,5617 ---- + eof + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" +! vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" + vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//` +*** ../vim-7.3.244/src/configure.in 2011-06-13 01:32:42.000000000 +0200 +--- src/configure.in 2011-07-13 17:57:01.000000000 +0200 +*************** +*** 1068,1074 **** + dnl -- delete the lines from make about Entering/Leaving directory + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" +! vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}" + vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + dnl remove -ltermcap, it can conflict with an earlier -lncurses + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` +--- 1068,1074 ---- + dnl -- delete the lines from make about Entering/Leaving directory + eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`" + rm -f -- "${tmp_mkf}" +! vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" + vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}" + dnl remove -ltermcap, it can conflict with an earlier -lncurses + vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//` +*** ../vim-7.3.244/src/version.c 2011-07-07 17:43:37.000000000 +0200 +--- src/version.c 2011-07-15 13:09:17.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 245, + /**/ + + +-- + When danger reared its ugly head, + He bravely turned his tail and fled + Yes, Brave Sir Robin turned about + And gallantly he chickened out + Bravely taking to his feet + He beat a very brave retreat + Bravest of the brave Sir Robin + Petrified of being dead + Soiled his pants then brave Sir Robin + Turned away and fled. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.246 b/source/ap/vim/patches/7.3.246 new file mode 100644 index 000000000..d9982ea04 --- /dev/null +++ b/source/ap/vim/patches/7.3.246 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.246 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.246 (after 7.3.235) +Problem: Repeating "f4" in "4444" skips one 4. +Solution: Check the t_cmd flag. (Christian Brabandt) +Files: src/search.c + + +*** ../vim-7.3.245/src/search.c 2011-06-26 05:36:07.000000000 +0200 +--- src/search.c 2011-07-15 13:16:49.000000000 +0200 +*************** +*** 1585,1591 **** + /* Force a move of at least one char, so ";" and "," will move the + * cursor, even if the cursor is right in front of char we are looking + * at. */ +! if (vim_strchr(p_cpo, CPO_SCOLON) == NULL && count == 1) + stop = FALSE; + } + +--- 1585,1591 ---- + /* Force a move of at least one char, so ";" and "," will move the + * cursor, even if the cursor is right in front of char we are looking + * at. */ +! if (vim_strchr(p_cpo, CPO_SCOLON) == NULL && count == 1 && t_cmd) + stop = FALSE; + } + +*** ../vim-7.3.245/src/version.c 2011-07-15 13:09:46.000000000 +0200 +--- src/version.c 2011-07-15 13:20:40.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 246, + /**/ + +-- + GALAHAD turns back. We see from his POV the lovely ZOOT standing by him + smiling enchantingly and a number of equally delectable GIRLIES draped + around in the seductively poulticed room. They look at him smilingly and + wave. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.247 b/source/ap/vim/patches/7.3.247 new file mode 100644 index 000000000..a0cb566c7 --- /dev/null +++ b/source/ap/vim/patches/7.3.247 @@ -0,0 +1,95 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.247 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.247 +Problem: Running tests changes the users viminfo file. Test for patch + 7.3.246 missing. +Solution: Add "nviminfo" to the 'viminfo' option. Include the test. +Files: src/testdir/test78.in, src/testdir/test81.in + + +*** ../vim-7.3.246/src/testdir/test78.in 2011-06-13 01:07:22.000000000 +0200 +--- src/testdir/test78.in 2011-07-15 13:26:22.000000000 +0200 +*************** +*** 6,12 **** + + STARTTEST + :so small.vim +! :set nocp fileformat=unix undolevels=-1 + :e! Xtest + ggdG + :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" +--- 6,12 ---- + + STARTTEST + :so small.vim +! :set nocp fileformat=unix undolevels=-1 viminfo+=nviminfo + :e! Xtest + ggdG + :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" +*** ../vim-7.3.246/src/testdir/test81.in 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/test81.in 2011-07-15 13:25:00.000000000 +0200 +*************** +*** 1,10 **** + Test for t movement command and 'cpo-;' setting + + STARTTEST +! :set nocompatible + :set cpo-=; + /firstline/ + j0tt;D + $Ty;D:set cpo+=; + j0tt;;D + $Ty;;D:?firstline?+1,$w! test.out +--- 1,12 ---- + Test for t movement command and 'cpo-;' setting + + STARTTEST +! :set nocompatible viminfo+=nviminfo + :set cpo-=; + /firstline/ + j0tt;D ++ 0fz;D ++ $Fy;D + $Ty;D:set cpo+=; + j0tt;;D + $Ty;;D:?firstline?+1,$w! test.out +*************** +*** 13,18 **** +--- 15,22 ---- + + firstline + aaa two three four ++ zzz ++ yyy + bbb yee yoo four + ccc two three four + ddd yee yoo four +*** ../vim-7.3.246/src/version.c 2011-07-15 13:21:24.000000000 +0200 +--- src/version.c 2011-07-15 13:31:14.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 247, + /**/ + +-- +ZOOT: I'm afraid our life must seem very dull and quiet compared to yours. + We are but eightscore young blondes, all between sixteen and + nineteen-and-a-half, cut off in this castle, with no one to protect us. + Oooh. It is a lonely life ... bathing ... dressing ... undressing ... + making exciting underwear.... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.248 b/source/ap/vim/patches/7.3.248 new file mode 100644 index 000000000..6fbf3f6cd --- /dev/null +++ b/source/ap/vim/patches/7.3.248 @@ -0,0 +1,129 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.248 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.248 +Problem: PC Install instructions missing install instructions. +Solution: Step-by-step explanation. (Michael Soyka) +Files: src/INSTALLpc.txt + + +*** ../vim-7.3.247/src/INSTALLpc.txt 2011-06-12 20:36:00.000000000 +0200 +--- src/INSTALLpc.txt 2011-07-15 13:49:46.000000000 +0200 +*************** +*** 11,19 **** + this, then you will get the default behavior as is documented, which should + be fine for most people. + +! With the exception of the last two sections (Windows 3.1 and MS-DOS), +! this document assumes that you are building Vim for Win32 +! (Windows NT/2000/XP/2003/Vista and Windows 95/98/Me) + + + Contents: +--- 11,19 ---- + this, then you will get the default behavior as is documented, which should + be fine for most people. + +! With the exception of two sections (Windows 3.1 and MS-DOS), this document +! assumes that you are building Vim for Win32 or later. +! (Windows 95/98/Me/NT/2000/XP/2003/Vista/7) + + + Contents: +*************** +*** 27,32 **** +--- 27,35 ---- + 8. Windows 3.1 + 9. MS-DOS + ++ 10. Installing after building from sources ++ ++ + The currently preferred method is using the free Visual C++ Toolkit 2008 + |msvc-2008-express|, the produced binary runs on most MS-Windows systems. If + you need the executable to run on Windows 98 or ME, use the 2003 one +*************** +*** 409,411 **** +--- 412,470 ---- + + If you get all kinds of strange error messages when compiling, try adding + changing the file format from "unix" to "dos". ++ ++ ++ 10. Installing after building from sources ++ ========================================== ++ ++ [provided by Michael Soyka] ++ ++ After you've built the Vim binaries as described above, you're ready to ++ install Vim on your system. However, if you've obtained the Vim sources ++ using Mercurial or by downloading them as a unix tar file, you must first ++ create a "vim73" directory. If you instead downloaded the sources as ++ zip files, you can skip this setup as the zip archives already have the ++ correct directory structure. ++ ++ A. Create a Vim "runtime" subdirectory named "vim73" ++ ----------------------------------------------------- ++ If you obtained your Vim sources as zip files, you can skip this step. ++ Otherwise, continue reading. ++ ++ Go to the directory that contains the Vim "src" and "runtime" ++ directories and create a new subdirectory named "vim73". ++ ++ Copy the "runtime" files into "vim73": ++ copy runtime\* vim73 ++ ++ B. Copy the new binaries into the "vim73" directory ++ ---------------------------------------------------- ++ Regardless of how you installed the Vim sources, you need to copy the ++ new binaries you created above into "vim73": ++ ++ copy src\*.exe vim73 ++ copy src\GvimExt\gvimext.dll vim73 ++ copy src\xxd\xxd.exe vim73 ++ ++ C. Move the "vim73" directory into the Vim installation subdirectory ++ --------------------------------------------------------------------- ++ Move the "vim73" subdirectory into the subdirectory where you want Vim ++ to be installed. Typically, this subdirectory will be named "vim". ++ If you already have a "vim73" subdirectory in "vim", delete it first ++ by running its unstal.exe program. ++ ++ D. Install Vim ++ --------------- ++ "cd" to your Vim installation subdirectory "vim\vim73" and run the ++ "install.exe" program. It will ask you a number of questions about ++ how you would like to have your Vim setup. Among these are: ++ - You can tell it to write a "_vimrc" file with your preferences in the ++ parent directory. ++ - It can also install an "Edit with Vim" entry in the Windows Explorer ++ popup menu. ++ - You can have it create batch files, so that you can run Vim from the ++ console or in a shell. You can select one of the directories in your ++ PATH or add the directory to PATH using the Windows Control Panel. ++ - Create entries for Vim on the desktop and in the Start menu. ++ ++ Happy Vimming! +*** ../vim-7.3.247/src/version.c 2011-07-15 13:33:17.000000000 +0200 +--- src/version.c 2011-07-15 13:51:03.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 248, + /**/ + +-- +Linux is just like a wigwam: no Windows, no Gates and an Apache inside. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.249 b/source/ap/vim/patches/7.3.249 new file mode 100644 index 000000000..661f97977 --- /dev/null +++ b/source/ap/vim/patches/7.3.249 @@ -0,0 +1,134 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.249 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.249 +Problem: Wrong indenting for array initializer. +Solution: Detect '}' in a better way. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.248/src/misc1.c 2011-06-12 21:51:01.000000000 +0200 +--- src/misc1.c 2011-07-15 14:06:44.000000000 +0200 +*************** +*** 7945,7952 **** + * If we're at the end of a block, skip to the start of + * that block. + */ +! curwin->w_cursor.col = 0; +! if (*cin_skipcomment(l) == '}' + && (trypos = find_start_brace(ind_maxcomment)) + != NULL) /* XXX */ + { +--- 7945,7951 ---- + * If we're at the end of a block, skip to the start of + * that block. + */ +! if (find_last_paren(l, '{', '}') + && (trypos = find_start_brace(ind_maxcomment)) + != NULL) /* XXX */ + { +*** ../vim-7.3.248/src/testdir/test3.in 2011-06-12 21:51:01.000000000 +0200 +--- src/testdir/test3.in 2011-07-15 14:03:41.000000000 +0200 +*************** +*** 1452,1457 **** +--- 1452,1487 ---- + + STARTTEST + :set cino& ++ :set cino+=l1 ++ 2kdd=][ ++ ENDTEST ++ ++ void func(void) ++ { ++ int tab[] = ++ { ++ 1, 2, 3, ++ 4, 5, 6}; ++ ++ printf("Indent this line correctly!\n"); ++ ++ switch (foo) ++ { ++ case bar: ++ printf("bar"); ++ break; ++ case baz: { ++ printf("baz"); ++ break; ++ } ++ case quux: ++ printf("But don't break the indentation of this instruction\n"); ++ break; ++ } ++ } ++ ++ STARTTEST ++ :set cino& + 2kdd=][ + ENDTEST + +*** ../vim-7.3.248/src/testdir/test3.ok 2011-06-12 21:51:01.000000000 +0200 +--- src/testdir/test3.ok 2011-07-15 14:03:41.000000000 +0200 +*************** +*** 1310,1315 **** +--- 1310,1340 ---- + + void func(void) + { ++ int tab[] = ++ { ++ 1, 2, 3, ++ 4, 5, 6}; ++ ++ printf("Indent this line correctly!\n"); ++ ++ switch (foo) ++ { ++ case bar: ++ printf("bar"); ++ break; ++ case baz: { ++ printf("baz"); ++ break; ++ } ++ case quux: ++ printf("But don't break the indentation of this instruction\n"); ++ break; ++ } ++ } ++ ++ ++ void func(void) ++ { + cout << "a" + << "b" + << ") :" +*** ../vim-7.3.248/src/version.c 2011-07-15 13:51:57.000000000 +0200 +--- src/version.c 2011-07-15 14:12:05.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 249, + /**/ + +-- + GALAHAD hurries to the door and pushes through it. As he leaves the room + we CUT TO the reverse to show that he is now in a room full of bathing + and romping GIRLIES, all innocent, wide-eyed and beautiful. They smile + enchantingly at him as he tries to keep walking without being diverted by + the lovely sights assaulting his eyeballs. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.250 b/source/ap/vim/patches/7.3.250 new file mode 100644 index 000000000..fc33328bd --- /dev/null +++ b/source/ap/vim/patches/7.3.250 @@ -0,0 +1,104 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.250 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.250 +Problem: Python: Errors in Unicode characters not handled nicely. +Solution: Add the surrogateescape error handler. (lilydjwg) +Files: src/if_python3.c + + +*** ../vim-7.3.249/src/if_python3.c 2011-06-26 19:13:33.000000000 +0200 +--- src/if_python3.c 2011-07-15 15:50:01.000000000 +0200 +*************** +*** 68,76 **** + + static void init_structs(void); + + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)ENC_OPT, NULL); + #define PyString_FreeBytes(obj) Py_XDECREF(bytes) + #define PyString_AsString(obj) PyBytes_AsString(obj) + #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) +--- 68,83 ---- + + static void init_structs(void); + ++ /* The "surrogateescape" error handler is new in Python 3.1 */ ++ #if PY_VERSION_HEX >= 0x030100f0 ++ # define CODEC_ERROR_HANDLER "surrogateescape" ++ #else ++ # define CODEC_ERROR_HANDLER NULL ++ #endif ++ + #define PyInt Py_ssize_t + #define PyString_Check(obj) PyUnicode_Check(obj) +! #define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)ENC_OPT, CODEC_ERROR_HANDLER); + #define PyString_FreeBytes(obj) Py_XDECREF(bytes) + #define PyString_AsString(obj) PyBytes_AsString(obj) + #define PyString_Size(obj) PyBytes_GET_SIZE(bytes) +*************** +*** 661,668 **** + + /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause + * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), (char *)ENC_OPT, NULL); +! cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", NULL); + Py_XDECREF(cmdstr); + PyRun_SimpleString(PyBytes_AsString(cmdbytes)); + Py_XDECREF(cmdbytes); +--- 668,676 ---- + + /* PyRun_SimpleString expects a UTF-8 string. Wrong encoding may cause + * SyntaxError (unicode error). */ +! cmdstr = PyUnicode_Decode(cmd, strlen(cmd), +! (char *)ENC_OPT, CODEC_ERROR_HANDLER); +! cmdbytes = PyUnicode_AsEncodedString(cmdstr, "utf-8", CODEC_ERROR_HANDLER); + Py_XDECREF(cmdstr); + PyRun_SimpleString(PyBytes_AsString(cmdbytes)); + Py_XDECREF(cmdbytes); +*************** +*** 1463,1469 **** + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)ENC_OPT, NULL); + + vim_free(tmp); + return result; +--- 1471,1477 ---- + } + *p = '\0'; + +! result = PyUnicode_Decode(tmp, len, (char *)ENC_OPT, CODEC_ERROR_HANDLER); + + vim_free(tmp); + return result; +*** ../vim-7.3.249/src/version.c 2011-07-15 14:12:25.000000000 +0200 +--- src/version.c 2011-07-15 15:46:19.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 250, + /**/ + +-- +DINGO: You must spank her well and after you have spanked her you + may deal with her as you like and then ... spank me. +AMAZING: And spank me! +STUNNER: And me. +LOVELY: And me. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.251 b/source/ap/vim/patches/7.3.251 new file mode 100644 index 000000000..43aa41487 --- /dev/null +++ b/source/ap/vim/patches/7.3.251 @@ -0,0 +1,184 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.251 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.251 +Problem: "gH" deletes the current line, except when it's the last + line. +Solution: Set the "include" flag to indicate the last line is to be deleted. +Files: src/normal.c, src/ops.c + + +*** ../vim-7.3.250/src/normal.c 2011-07-07 15:08:53.000000000 +0200 +--- src/normal.c 2011-07-15 16:53:12.000000000 +0200 +*************** +*** 1795,1811 **** + { + oap->inclusive = FALSE; + /* Try to include the newline, unless it's an operator +! * that works on lines only */ +! if (*p_sel != 'o' +! && !op_on_lines(oap->op_type) +! && oap->end.lnum < curbuf->b_ml.ml_line_count) + { +! ++oap->end.lnum; +! oap->end.col = 0; + # ifdef FEAT_VIRTUALEDIT +! oap->end.coladd = 0; + # endif +! ++oap->line_count; + } + } + } +--- 1795,1819 ---- + { + oap->inclusive = FALSE; + /* Try to include the newline, unless it's an operator +! * that works on lines only. */ +! if (*p_sel != 'o' && !op_on_lines(oap->op_type)) + { +! if (oap->end.lnum < curbuf->b_ml.ml_line_count) +! { +! ++oap->end.lnum; +! oap->end.col = 0; + # ifdef FEAT_VIRTUALEDIT +! oap->end.coladd = 0; + # endif +! ++oap->line_count; +! } +! else +! { +! /* Cannot move below the last line, make the op +! * inclusive to tell the operation to include the +! * line break. */ +! oap->inclusive = TRUE; +! } + } + } + } +*** ../vim-7.3.250/src/ops.c 2011-06-19 01:14:22.000000000 +0200 +--- src/ops.c 2011-07-15 17:28:28.000000000 +0200 +*************** +*** 1650,1656 **** + && oap->line_count > 1 + && oap->op_type == OP_DELETE) + { +! ptr = ml_get(oap->end.lnum) + oap->end.col + oap->inclusive; + ptr = skipwhite(ptr); + if (*ptr == NUL && inindent(0)) + oap->motion_type = MLINE; +--- 1650,1658 ---- + && oap->line_count > 1 + && oap->op_type == OP_DELETE) + { +! ptr = ml_get(oap->end.lnum) + oap->end.col; +! if (*ptr != NUL) +! ptr += oap->inclusive; + ptr = skipwhite(ptr); + if (*ptr == NUL && inindent(0)) + oap->motion_type = MLINE; +*************** +*** 1920,1930 **** + curwin->w_cursor.coladd = 0; + } + #endif +! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE + #ifdef FEAT_VISUAL + && !oap->is_VIsual + #endif + ); + } + else /* delete characters between lines */ + { +--- 1922,1941 ---- + curwin->w_cursor.coladd = 0; + } + #endif +! if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count +! && n > (int)STRLEN(ml_get(oap->end.lnum))) +! { +! /* Special case: gH deletes the last line. */ +! del_lines(1L, FALSE); +! } +! else +! { +! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE + #ifdef FEAT_VISUAL + && !oap->is_VIsual + #endif + ); ++ } + } + else /* delete characters between lines */ + { +*************** +*** 1941,1957 **** + ++curwin->w_cursor.lnum; + del_lines((long)(oap->line_count - 2), FALSE); + +! /* delete from start of line until op_end */ +! curwin->w_cursor.col = 0; +! (void)del_bytes((long)(oap->end.col + 1 - !oap->inclusive), +! !virtual_op, oap->op_type == OP_DELETE + #ifdef FEAT_VISUAL + && !oap->is_VIsual + #endif + ); +! curwin->w_cursor = curpos; /* restore curwin->w_cursor */ +! +! (void)do_join(2, FALSE, FALSE); + } + } + +--- 1952,1980 ---- + ++curwin->w_cursor.lnum; + del_lines((long)(oap->line_count - 2), FALSE); + +! n = (oap->end.col + 1 - !oap->inclusive); +! if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count +! && n > (int)STRLEN(ml_get(oap->end.lnum))) +! { +! /* Special case: gH deletes the last line. */ +! del_lines(1L, FALSE); +! curwin->w_cursor = curpos; /* restore curwin->w_cursor */ +! if (curwin->w_cursor.lnum > 1) +! --curwin->w_cursor.lnum; +! } +! else +! { +! /* delete from start of line until op_end */ +! curwin->w_cursor.col = 0; +! (void)del_bytes((long)n, !virtual_op, oap->op_type == OP_DELETE + #ifdef FEAT_VISUAL + && !oap->is_VIsual + #endif + ); +! curwin->w_cursor = curpos; /* restore curwin->w_cursor */ +! } +! if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +! (void)do_join(2, FALSE, FALSE); + } + } + +*** ../vim-7.3.250/src/version.c 2011-07-15 15:54:39.000000000 +0200 +--- src/version.c 2011-07-15 17:35:18.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 251, + /**/ + +-- + ### Hiroshima 45, Chernobyl 86, Windows 95 ### + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.252 b/source/ap/vim/patches/7.3.252 new file mode 100644 index 000000000..e24b73be7 --- /dev/null +++ b/source/ap/vim/patches/7.3.252 @@ -0,0 +1,43 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.252 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.252 (after 7.3.247) +Problem: Tests fail. (David Northfield) +Solution: Add missing update for .ok file. +Files: src/testdir/test81.ok + + +*** ../vim-7.3.251/src/testdir/test81.ok 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/test81.ok 2011-07-15 13:14:27.000000000 +0200 +*************** +*** 1,4 **** +--- 1,6 ---- + aaa two ++ z ++ y + bbb y + ccc + ddd yee y +*** ../vim-7.3.251/src/version.c 2011-07-15 17:51:30.000000000 +0200 +--- src/version.c 2011-07-15 17:55:25.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 252, + /**/ + +-- +You cannot propel yourself forward by patting yourself on the back. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.253 b/source/ap/vim/patches/7.3.253 new file mode 100644 index 000000000..70e415b5d --- /dev/null +++ b/source/ap/vim/patches/7.3.253 @@ -0,0 +1,539 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.253 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.253 +Problem: "echo 'abc' > ''" returns 0 or 1, depending on 'ignorecase'. + Checks in mb_strnicmp() for illegal and truncated bytes are + wrong. Should not assume that byte length is equal before case + folding. +Solution: Add utf_safe_read_char_adv() and utf_strnicmp(). Add a test for + this. (Ivan Krasilnikov) +Files: src/mbyte.c src/testdir/test82.in, src/testdir/test82.ok, + src/testdir/Makefile, src/testdir/Make_amiga.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + src/testdir/Make_os2.mak, src/testdir/Make_vms.mms + + +*** ../vim-7.3.252/src/mbyte.c 2011-07-07 15:08:53.000000000 +0200 +--- src/mbyte.c 2011-07-15 20:13:52.000000000 +0200 +*************** +*** 132,137 **** +--- 132,138 ---- + static int dbcs_char2cells __ARGS((int c)); + static int dbcs_ptr2cells_len __ARGS((char_u *p, int size)); + static int dbcs_ptr2char __ARGS((char_u *p)); ++ static int utf_safe_read_char_adv __ARGS((char_u **s, size_t *n)); + + /* + * Lookup table to quickly get the length in bytes of a UTF-8 character from +*************** +*** 1701,1706 **** +--- 1702,1767 ---- + } + + /* ++ * Convert a UTF-8 byte sequence to a wide character. ++ * String is assumed to be terminated by NUL or after "n" bytes, whichever ++ * comes first. ++ * The function is safe in the sense that it never accesses memory beyond the ++ * first "n" bytes of "s". ++ * ++ * On success, returns decoded codepoint, advances "s" to the beginning of ++ * next character and decreases "n" accordingly. ++ * ++ * If end of string was reached, returns 0 and, if "n" > 0, advances "s" past ++ * NUL byte. ++ * ++ * If byte sequence is illegal or incomplete, returns -1 and does not advance ++ * "s". ++ */ ++ static int ++ utf_safe_read_char_adv(s, n) ++ char_u **s; ++ size_t *n; ++ { ++ int c, k; ++ ++ if (*n == 0) /* end of buffer */ ++ return 0; ++ ++ k = utf8len_tab_zero[**s]; ++ ++ if (k == 1) ++ { ++ /* ASCII character or NUL */ ++ (*n)--; ++ return *(*s)++; ++ } ++ ++ if ((size_t)k <= *n) ++ { ++ /* We have a multibyte sequence and it isn't truncated by buffer ++ * limits so utf_ptr2char() is safe to use. Or the first byte is ++ * illegal (k=0), and it's also safe to use utf_ptr2char(). */ ++ c = utf_ptr2char(*s); ++ ++ /* On failure, utf_ptr2char() returns the first byte, so here we ++ * check equality with the first byte. The only non-ASCII character ++ * which equals the first byte of its own UTF-8 representation is ++ * U+00C3 (UTF-8: 0xC3 0x83), so need to check that special case too. ++ * It's safe even if n=1, else we would have k=2 > n. */ ++ if (c != (int)(**s) || (c == 0xC3 && (*s)[1] == 0x83)) ++ { ++ /* byte sequence was successfully decoded */ ++ *s += k; ++ *n -= k; ++ return c; ++ } ++ } ++ ++ /* byte sequence is incomplete or illegal */ ++ return -1; ++ } ++ ++ /* + * Get character at **pp and advance *pp to the next character. + * Note: composing characters are skipped! + */ +*************** +*** 2667,2673 **** + {0x10400,0x10427,1,40} + }; + +! static int utf_convert(int a, convertStruct table[], int tableSize); + + /* + * Generic conversion function for case operations. +--- 2728,2735 ---- + {0x10400,0x10427,1,40} + }; + +! static int utf_convert __ARGS((int a, convertStruct table[], int tableSize)); +! static int utf_strnicmp __ARGS((char_u *s1, char_u *s2, size_t n1, size_t n2)); + + /* + * Generic conversion function for case operations. +*************** +*** 3079,3084 **** +--- 3141,3220 ---- + return (utf_tolower(a) != a); + } + ++ static int ++ utf_strnicmp(s1, s2, n1, n2) ++ char_u *s1, *s2; ++ size_t n1, n2; ++ { ++ int c1, c2, cdiff; ++ char_u buffer[6]; ++ ++ for (;;) ++ { ++ c1 = utf_safe_read_char_adv(&s1, &n1); ++ c2 = utf_safe_read_char_adv(&s2, &n2); ++ ++ if (c1 <= 0 || c2 <= 0) ++ break; ++ ++ if (c1 == c2) ++ continue; ++ ++ cdiff = utf_fold(c1) - utf_fold(c2); ++ if (cdiff != 0) ++ return cdiff; ++ } ++ ++ /* some string ended or has an incomplete/illegal character sequence */ ++ ++ if (c1 == 0 || c2 == 0) ++ { ++ /* some string ended. shorter string is smaller */ ++ if (c1 == 0 && c2 == 0) ++ return 0; ++ return c1 == 0 ? -1 : 1; ++ } ++ ++ /* Continue with bytewise comparison to produce some result that ++ * would make comparison operations involving this function transitive. ++ * ++ * If only one string had an error, comparison should be made with ++ * folded version of the other string. In this case it is enough ++ * to fold just one character to determine the result of comparison. */ ++ ++ if (c1 != -1 && c2 == -1) ++ { ++ n1 = utf_char2bytes(utf_fold(c1), buffer); ++ s1 = buffer; ++ } ++ else if (c2 != -1 && c1 == -1) ++ { ++ n2 = utf_char2bytes(utf_fold(c2), buffer); ++ s2 = buffer; ++ } ++ ++ while (n1 > 0 && n2 > 0 && *s1 != NUL && *s2 != NUL) ++ { ++ cdiff = (int)(*s1) - (int)(*s2); ++ if (cdiff != 0) ++ return cdiff; ++ ++ s1++; ++ s2++; ++ n1--; ++ n2--; ++ } ++ ++ if (n1 > 0 && *s1 == NUL) ++ n1 = 0; ++ if (n2 > 0 && *s2 == NUL) ++ n2 = 0; ++ ++ if (n1 == 0 && n2 == 0) ++ return 0; ++ return n1 == 0 ? -1 : 1; ++ } ++ + /* + * Version of strnicmp() that handles multi-byte characters. + * Needed for Big5, Sjift-JIS and UTF-8 encoding. Other DBCS encodings can +*************** +*** 3092,3140 **** + char_u *s1, *s2; + size_t nn; + { +! int i, j, l; + int cdiff; +- int incomplete = FALSE; + int n = (int)nn; + +! for (i = 0; i < n; i += l) + { +! if (s1[i] == NUL && s2[i] == NUL) /* both strings end */ +! return 0; +! if (enc_utf8) +! { +! l = utf_byte2len(s1[i]); +! if (l > n - i) +! { +! l = n - i; /* incomplete character */ +! incomplete = TRUE; +! } +! /* Check directly first, it's faster. */ +! for (j = 0; j < l; ++j) +! { +! if (s1[i + j] != s2[i + j]) +! break; +! if (s1[i + j] == 0) +! /* Both stings have the same bytes but are incomplete or +! * have illegal bytes, accept them as equal. */ +! l = j; +! } +! if (j < l) +! { +! /* If one of the two characters is incomplete return -1. */ +! if (incomplete || i + utf_byte2len(s2[i]) > n) +! return -1; +! /* Don't case-fold illegal bytes or truncated characters. */ +! if (utf_ptr2len(s1 + i) < l || utf_ptr2len(s2 + i) < l) +! return -1; +! cdiff = utf_fold(utf_ptr2char(s1 + i)) +! - utf_fold(utf_ptr2char(s2 + i)); +! if (cdiff != 0) +! return cdiff; +! } +! } +! else + { + l = (*mb_ptr2len)(s1 + i); + if (l <= 1) + { +--- 3228,3248 ---- + char_u *s1, *s2; + size_t nn; + { +! int i, l; + int cdiff; + int n = (int)nn; + +! if (enc_utf8) + { +! return utf_strnicmp(s1, s2, nn, nn); +! } +! else +! { +! for (i = 0; i < n; i += l) + { ++ if (s1[i] == NUL && s2[i] == NUL) /* both strings end */ ++ return 0; ++ + l = (*mb_ptr2len)(s1 + i); + if (l <= 1) + { +*** ../vim-7.3.252/src/testdir/test82.in 2011-07-15 21:16:03.000000000 +0200 +--- src/testdir/test82.in 2011-07-15 18:22:46.000000000 +0200 +*************** +*** 0 **** +--- 1,93 ---- ++ Tests for case-insensitive UTF-8 comparisons (utf_strnicmp() in mbyte.c) ++ ++ STARTTEST ++ :so small.vim ++ :if !has("multi_byte") ++ : e! test.ok ++ : w! test.out ++ : qa! ++ :endif ++ :set enc=utf8 ++ ggdG ++ : ++ :function! Ch(a, op, b, expected) ++ : if eval(printf('"%s" %s "%s"', a:a, a:op, a:b)) != a:expected ++ : call append(line('$'), printf('"%s" %s "%s" should return %d', a:a, a:op, a:b, a:expected)) ++ : else ++ : let b:passed += 1 ++ : endif ++ :endfunction ++ : ++ :function! Chk(a, b, result) ++ : if a:result == 0 ++ : call Ch(a:a, '==?', a:b, 1) ++ : call Ch(a:a, '!=?', a:b, 0) ++ : call Ch(a:a, '<=?', a:b, 1) ++ : call Ch(a:a, '>=?', a:b, 1) ++ : call Ch(a:a, '?', a:b, 0) ++ : elseif a:result > 0 ++ : call Ch(a:a, '==?', a:b, 0) ++ : call Ch(a:a, '!=?', a:b, 1) ++ : call Ch(a:a, '<=?', a:b, 0) ++ : call Ch(a:a, '>=?', a:b, 1) ++ : call Ch(a:a, '?', a:b, 1) ++ : else ++ : call Ch(a:a, '==?', a:b, 0) ++ : call Ch(a:a, '!=?', a:b, 1) ++ : call Ch(a:a, '<=?', a:b, 1) ++ : call Ch(a:a, '>=?', a:b, 0) ++ : call Ch(a:a, '?', a:b, 0) ++ : endif ++ :endfunction ++ : ++ :function! Check(a, b, result) ++ : call Chk(a:a, a:b, a:result) ++ : call Chk(a:b, a:a, -a:result) ++ :endfunction ++ : ++ :function! LT(a, b) ++ : call Check(a:a, a:b, -1) ++ :endfunction ++ : ++ :function! GT(a, b) ++ : call Check(a:a, a:b, 1) ++ :endfunction ++ : ++ :function! EQ(a, b) ++ : call Check(a:a, a:b, 0) ++ :endfunction ++ : ++ :let b:passed=0 ++ :call EQ('', '') ++ :call LT('', 'a') ++ :call EQ('abc', 'abc') ++ :call EQ('Abc', 'abC') ++ :call LT('ab', 'abc') ++ :call LT('AB', 'abc') ++ :call LT('ab', 'aBc') ++ :call EQ('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xb9\xd0\xa6\xd0\xa3\xd0\xba\xd0\x95\xd0\xbd') ++ :call LT('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xaf\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd') ++ :call EQ('\xe2\x84\xaa', 'k') ++ :call LT('\xe2\x84\xaa', 'kkkkkk') ++ :call EQ('\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa', 'kkk') ++ :call LT('kk', '\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa') ++ :call EQ('\xe2\x84\xaa\xe2\x84\xa6k\xe2\x84\xaak\xcf\x89', 'k\xcf\x89\xe2\x84\xaakk\xe2\x84\xa6') ++ :call EQ('Abc\x80', 'AbC\x80') ++ :call LT('Abc\x80', 'AbC\x81') ++ :call LT('Abc', 'AbC\x80') ++ :call LT('abc\x80DEF', 'abc\x80def') " case folding stops at the first bad character ++ :call LT('\xc3XYZ', '\xc3xyz') ++ :call EQ('\xef\xbc\xba', '\xef\xbd\x9a') " FF3A (upper), FF5A (lower) ++ :call GT('\xef\xbc\xba', '\xef\xbc\xff') " first string is ok and equals \xef\xbd\x9a after folding, second string is illegal and was left unchanged, then the strings were bytewise compared ++ :call LT('\xc3', '\xc3\x83') ++ :call EQ('\xc3\xa3xYz', '\xc3\x83XyZ') ++ :for n in range(0x60, 0xFF) | call LT(printf('xYz\x%.2X', n-1), printf('XyZ\x%.2X', n)) | endfor ++ :for n in range(0x80, 0xBF) | call EQ(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n)) | endfor ++ :for n in range(0xC0, 0xFF) | call LT(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n)) | endfor ++ :call append(0, printf('%d checks passed', b:passed)) ++ :wq! test.out ++ ENDTEST ++ +*** ../vim-7.3.252/src/testdir/test82.ok 2011-07-15 21:16:03.000000000 +0200 +--- src/testdir/test82.ok 2011-07-15 18:37:33.000000000 +0200 +*************** +*** 0 **** +--- 1,2 ---- ++ 3732 checks passed ++ +*** ../vim-7.3.252/src/testdir/Makefile 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Makefile 2011-07-15 18:30:08.000000000 +0200 +*************** +*** 26,32 **** + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS_GUI = test16.out + +--- 26,32 ---- + test64.out test65.out test66.out test67.out test68.out \ + test69.out test70.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out test82.out + + SCRIPTS_GUI = test16.out + +*** ../vim-7.3.252/src/testdir/Make_amiga.mak 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_amiga.mak 2011-07-15 18:29:50.000000000 +0200 +*************** +*** 29,35 **** + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ + test76.out test77.out test78.out test79.out test80.out \ +! test81.out + + .SUFFIXES: .in .out + +--- 29,35 ---- + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ + test76.out test77.out test78.out test79.out test80.out \ +! test81.out test82.out + + .SUFFIXES: .in .out + +*************** +*** 130,132 **** +--- 130,133 ---- + test79.out: test79.in + test80.out: test80.in + test81.out: test81.in ++ test82.out: test82.in +*** ../vim-7.3.252/src/testdir/Make_dos.mak 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_dos.mak 2011-07-15 18:30:02.000000000 +0200 +*************** +*** 29,35 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS32 = test50.out test70.out + +--- 29,35 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out test82.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.252/src/testdir/Make_ming.mak 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_ming.mak 2011-07-15 18:30:15.000000000 +0200 +*************** +*** 49,55 **** + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out + + SCRIPTS32 = test50.out test70.out + +--- 49,55 ---- + test42.out test52.out test65.out test66.out test67.out \ + test68.out test69.out test71.out test72.out test73.out \ + test74.out test75.out test76.out test77.out test78.out \ +! test79.out test80.out test81.out test82.out + + SCRIPTS32 = test50.out test70.out + +*** ../vim-7.3.252/src/testdir/Make_os2.mak 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_os2.mak 2011-07-15 18:30:25.000000000 +0200 +*************** +*** 29,35 **** + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ + test76.out test77.out test78.out test79.out test80.out \ +! test81.out + + .SUFFIXES: .in .out + +--- 29,35 ---- + test66.out test67.out test68.out test69.out test70.out \ + test71.out test72.out test73.out test74.out test75.out \ + test76.out test77.out test78.out test79.out test80.out \ +! test81.out test82.out + + .SUFFIXES: .in .out + +*** ../vim-7.3.252/src/testdir/Make_vms.mms 2011-06-26 05:36:07.000000000 +0200 +--- src/testdir/Make_vms.mms 2011-07-15 18:30:33.000000000 +0200 +*************** +*** 4,10 **** + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jun 26 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +--- 4,10 ---- + # Authors: Zoltan Arpadffy, + # Sandor Kopanyi, + # +! # Last change: 2011 Jul 15 + # + # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. + # Edit the lines in the Configuration section below to select. +*************** +*** 75,81 **** + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out test79.out test80.out test81.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +--- 75,82 ---- + test61.out test62.out test63.out test64.out test65.out \ + test66.out test67.out test68.out test69.out \ + test71.out test72.out test74.out test75.out test76.out \ +! test77.out test78.out test79.out test80.out test81.out \ +! test82.out + + # Known problems: + # Test 30: a problem around mac format - unknown reason +*** ../vim-7.3.252/src/version.c 2011-07-15 17:56:11.000000000 +0200 +--- src/version.c 2011-07-15 21:12:26.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 253, + /**/ + +-- +"Intelligence has much less practical application than you'd think." + -- Scott Adams, Dilbert. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.254 b/source/ap/vim/patches/7.3.254 new file mode 100644 index 000000000..85176a7a6 --- /dev/null +++ b/source/ap/vim/patches/7.3.254 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.254 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.254 +Problem: The coladd field is not reset when setting the line number for a + ":call" command. +Solution: Reset it. +Files: src/eval.c + + +*** ../vim-7.3.253/src/eval.c 2011-07-07 17:36:52.000000000 +0200 +--- src/eval.c 2011-07-07 17:51:42.000000000 +0200 +*************** +*** 3430,3435 **** +--- 3430,3438 ---- + { + curwin->w_cursor.lnum = lnum; + curwin->w_cursor.col = 0; ++ #ifdef FEAT_VIRTUALEDIT ++ curwin->w_cursor.coladd = 0; ++ #endif + } + arg = startarg; + if (get_func_tv(name, (int)STRLEN(name), &rettv, &arg, +*** ../vim-7.3.253/src/version.c 2011-07-15 21:16:54.000000000 +0200 +--- src/version.c 2011-07-15 21:23:16.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 254, + /**/ + +-- +Eight Megabytes And Continually Swapping. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.255 b/source/ap/vim/patches/7.3.255 new file mode 100644 index 000000000..c01a585ec --- /dev/null +++ b/source/ap/vim/patches/7.3.255 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.255 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.255 +Problem: When editing a file such as "File[2010-08-15].vim" an E16 error is + given. (Manuel Stol) +Solution: Don't give an error for failing to compile the regexp. +Files: src/ex_docmd.c, src/misc1.c, src/vim.h + + +*** ../vim-7.3.254/src/ex_docmd.c 2011-06-13 01:19:48.000000000 +0200 +--- src/ex_docmd.c 2011-07-20 14:48:01.000000000 +0200 +*************** +*** 7069,7075 **** + old_arg_count = GARGCOUNT; + if (expand_wildcards(old_arg_count, old_arg_files, + &new_arg_file_count, &new_arg_files, +! EW_FILE|EW_NOTFOUND|EW_ADDSLASH) == OK + && new_arg_file_count > 0) + { + alist_set(&global_alist, new_arg_file_count, new_arg_files, +--- 7069,7075 ---- + old_arg_count = GARGCOUNT; + if (expand_wildcards(old_arg_count, old_arg_files, + &new_arg_file_count, &new_arg_files, +! EW_FILE|EW_NOTFOUND|EW_ADDSLASH|EW_NOERROR) == OK + && new_arg_file_count > 0) + { + alist_set(&global_alist, new_arg_file_count, new_arg_files, +*** ../vim-7.3.254/src/misc1.c 2011-07-15 14:12:25.000000000 +0200 +--- src/misc1.c 2011-07-20 14:55:09.000000000 +0200 +*************** +*** 9043,9050 **** +--- 9043,9054 ---- + } + + /* compile the regexp into a program */ ++ if (flags & EW_NOERROR) ++ ++emsg_silent; + regmatch.rm_ic = TRUE; /* Always ignore case */ + regmatch.regprog = vim_regcomp(pat, RE_MAGIC); ++ if (flags & EW_NOERROR) ++ --emsg_silent; + vim_free(pat); + + if (regmatch.regprog == NULL) +*** ../vim-7.3.254/src/vim.h 2011-06-13 02:03:55.000000000 +0200 +--- src/vim.h 2011-07-20 14:50:13.000000000 +0200 +*************** +*** 815,820 **** +--- 815,821 ---- + #define EW_EXEC 0x40 /* executable files */ + #define EW_PATH 0x80 /* search in 'path' too */ + #define EW_ICASE 0x100 /* ignore case */ ++ #define EW_NOERROR 0x200 /* no error for bad regexp */ + /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND + * is used when executing commands and EW_SILENT for interactive expanding. */ + +*** ../vim-7.3.254/src/version.c 2011-07-15 21:24:06.000000000 +0200 +--- src/version.c 2011-07-20 15:03:52.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 255, + /**/ + +-- +Not too long ago, a program was something you watched on TV... + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.256 b/source/ap/vim/patches/7.3.256 new file mode 100644 index 000000000..b8c9f00d1 --- /dev/null +++ b/source/ap/vim/patches/7.3.256 @@ -0,0 +1,322 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.256 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.256 +Problem: Javascript indenting not sufficiently tested. +Solution: Add more tests. (Luc Deschenaux) Mark the lines that are indented + wrong. +Files: src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.255/src/testdir/test3.in 2011-07-15 14:12:25.000000000 +0200 +--- src/testdir/test3.in 2011-07-15 21:05:49.000000000 +0200 +*************** +*** 1592,1598 **** + + + STARTTEST +! :set cino=J1 + /^JSSTART + =/^JSEND + ENDTEST +--- 1592,1598 ---- + + + STARTTEST +! :set cino=j1,J1 + /^JSSTART + =/^JSEND + ENDTEST +*************** +*** 1613,1618 **** +--- 1613,1757 ---- + JSEND + + STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ var foo = [ ++ 1, // indent 8 more ++ 2, ++ 3 ++ ]; // indent 8 less ++ JSEND ++ ++ STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ function bar() { ++ var foo = [ ++ 1, ++ 2, ++ 3 ++ ]; // indent 16 less ++ } ++ JSEND ++ ++ STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ (function($){ ++ ++ var class_name='myclass'; ++ ++ function private_method() { ++ } ++ ++ var public_method={ ++ method: function(options,args){ ++ private_method(); ++ } ++ } ++ ++ function init(options) { ++ ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, // indent 8 more ++ foobar: [ // indent 8 more ++ 1, // indent 8 more ++ 2, // indent 16 more ++ 3 // indent 16 more ++ ], ++ callback: function(){ // indent 8 more ++ return true; // indent 8 more ++ } // indent 8 more ++ }, options||{})); ++ } ++ ++ $.fn[class_name]=function() { ++ ++ var _arguments=arguments; ++ return this.each(function(){ ++ ++ var options=$(this).data(class_name+'_public'); ++ if (!options) { ++ init.apply(this,_arguments); ++ ++ } else { ++ var method=public_method[_arguments[0]]; ++ ++ if (typeof(method)!='function') { ++ console.log(class_name+' has no method "'+_arguments[0]+'"'); ++ return false; ++ } ++ _arguments[0]=options; ++ method.apply(this,_arguments); ++ } ++ }); ++ } ++ ++ })(jQuery); ++ JSEND ++ ++ STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ function init(options) { ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, ++ foobar: [ ++ 1, // indent 8 more ++ 2, // indent 8 more ++ 3 // indent 8 more ++ ], ++ callback: function(){ ++ return true; ++ } ++ }, options||{})); ++ } ++ JSEND ++ ++ STARTTEST ++ :set cino=j1,J1 ++ /^JSSTART ++ =/^JSEND ++ ENDTEST ++ ++ JSSTART ++ (function($){ ++ function init(options) { ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, // indent 8 more ++ foobar: [ // indent 8 more ++ 1, // indent 8 more ++ 2, // indent 16 more ++ 3 // indent 16 more ++ ], ++ callback: function(){ // indent 8 more ++ return true; // indent 8 more ++ } // indent 8 more ++ }, options||{})); ++ } ++ })(jQuery); ++ JSEND ++ ++ STARTTEST + :g/^STARTTEST/.,/^ENDTEST/d + :1;/start of AUTO/,$wq! test.out + ENDTEST +*** ../vim-7.3.255/src/testdir/test3.ok 2011-07-15 14:12:25.000000000 +0200 +--- src/testdir/test3.ok 2011-07-15 21:06:38.000000000 +0200 +*************** +*** 1443,1445 **** +--- 1443,1559 ---- + } + JSEND + ++ ++ JSSTART ++ var foo = [ ++ 1, // indent 8 more ++ 2, ++ 3 ++ ]; // indent 8 less ++ JSEND ++ ++ ++ JSSTART ++ function bar() { ++ var foo = [ ++ 1, ++ 2, ++ 3 ++ ]; // indent 16 less ++ } ++ JSEND ++ ++ ++ JSSTART ++ (function($){ ++ ++ var class_name='myclass'; ++ ++ function private_method() { ++ } ++ ++ var public_method={ ++ method: function(options,args){ ++ private_method(); ++ } ++ } ++ ++ function init(options) { ++ ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, // indent 8 more ++ foobar: [ // indent 8 more ++ 1, // indent 8 more ++ 2, // indent 16 more ++ 3 // indent 16 more ++ ], ++ callback: function(){ // indent 8 more ++ return true; // indent 8 more ++ } // indent 8 more ++ }, options||{})); ++ } ++ ++ $.fn[class_name]=function() { ++ ++ var _arguments=arguments; ++ return this.each(function(){ ++ ++ var options=$(this).data(class_name+'_public'); ++ if (!options) { ++ init.apply(this,_arguments); ++ ++ } else { ++ var method=public_method[_arguments[0]]; ++ ++ if (typeof(method)!='function') { ++ console.log(class_name+' has no method "'+_arguments[0]+'"'); ++ return false; ++ } ++ _arguments[0]=options; ++ method.apply(this,_arguments); ++ } ++ }); ++ } ++ ++ })(jQuery); ++ JSEND ++ ++ ++ JSSTART ++ function init(options) { ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, ++ foobar: [ ++ 1, // indent 8 more ++ 2, // indent 8 more ++ 3 // indent 8 more ++ ], ++ callback: function(){ ++ return true; ++ } ++ }, options||{})); ++ } ++ JSEND ++ ++ ++ JSSTART ++ (function($){ ++ function init(options) { ++ $(this).data(class_name+'_public',$.extend({},{ ++ foo: 'bar', ++ bar: 2, // indent 8 more ++ foobar: [ // indent 8 more ++ 1, // indent 8 more ++ 2, // indent 16 more ++ 3 // indent 16 more ++ ], ++ callback: function(){ // indent 8 more ++ return true; // indent 8 more ++ } // indent 8 more ++ }, options||{})); ++ } ++ })(jQuery); ++ JSEND ++ +*** ../vim-7.3.255/src/version.c 2011-07-20 15:04:52.000000000 +0200 +--- src/version.c 2011-07-20 15:08:13.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 256, + /**/ + +-- +Not too long ago, a keyboard was something to make music with... + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.257 b/source/ap/vim/patches/7.3.257 new file mode 100644 index 000000000..f6292bf8d --- /dev/null +++ b/source/ap/vim/patches/7.3.257 @@ -0,0 +1,97 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.257 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.257 +Problem: Not all completions are available to user commands. +Solution: Add "color", "compiler", "file_in_path" and "locale". (Dominique + Pelle) +Files: src/ex_docmd.c, runtime/doc/map.txt + + +*** ../vim-7.3.256/src/ex_docmd.c 2011-07-20 15:04:52.000000000 +0200 +--- src/ex_docmd.c 2011-07-20 16:10:28.000000000 +0200 +*************** +*** 5297,5303 **** +--- 5297,5305 ---- + { + {EXPAND_AUGROUP, "augroup"}, + {EXPAND_BUFFERS, "buffer"}, ++ {EXPAND_COLORS, "color"}, + {EXPAND_COMMANDS, "command"}, ++ {EXPAND_COMPILER, "compiler"}, + #if defined(FEAT_CSCOPE) + {EXPAND_CSCOPE, "cscope"}, + #endif +*************** +*** 5310,5319 **** +--- 5312,5326 ---- + {EXPAND_EVENTS, "event"}, + {EXPAND_EXPRESSION, "expression"}, + {EXPAND_FILES, "file"}, ++ {EXPAND_FILES_IN_PATH, "file_in_path"}, + {EXPAND_FILETYPE, "filetype"}, + {EXPAND_FUNCTIONS, "function"}, + {EXPAND_HELP, "help"}, + {EXPAND_HIGHLIGHT, "highlight"}, ++ #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ ++ && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) ++ {EXPAND_LOCALES, "locale"}, ++ #endif + {EXPAND_MAPPINGS, "mapping"}, + {EXPAND_MENUS, "menu"}, + {EXPAND_OWNSYNTAX, "syntax"}, +*** ../vim-7.3.256/runtime/doc/map.txt 2011-05-19 17:25:36.000000000 +0200 +--- runtime/doc/map.txt 2011-07-20 16:10:28.000000000 +0200 +*************** +*** 1202,1221 **** +--- 1211,1236 ---- + + -complete=augroup autocmd groups + -complete=buffer buffer names ++ -complete=color color schemes + -complete=command Ex command (and arguments) ++ -complete=compiler compilers ++ -complete=cscope |:cscope| suboptions + -complete=dir directory names + -complete=environment environment variable names + -complete=event autocommand events + -complete=expression Vim expression + -complete=file file and directory names ++ -complete=file_in_path file and directory names in |'path'| + -complete=filetype filetype names |'filetype'| + -complete=function function name + -complete=help help subjects + -complete=highlight highlight groups ++ -complete=locale locale names (as output of locale -a) + -complete=mapping mapping name + -complete=menu menus + -complete=option options + -complete=shellcmd Shell command ++ -complete=sign |:sign| suboptions + -complete=syntax syntax file names |'syntax'| + -complete=tag tags + -complete=tag_listfiles tags, file names are shown when CTRL-D is hit +*** ../vim-7.3.256/src/version.c 2011-07-20 15:09:38.000000000 +0200 +--- src/version.c 2011-07-20 16:30:31.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 257, + /**/ + +-- +I have to exercise early in the morning before my brain +figures out what I'm doing. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.258 b/source/ap/vim/patches/7.3.258 new file mode 100644 index 000000000..277cbe774 --- /dev/null +++ b/source/ap/vim/patches/7.3.258 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.258 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.258 +Problem: MS-Windows: The edit with existing vim context menu entries can be + unwanted. +Solution: Let a registry entry disable them. (Jerome Vuarand) +Files: src/GvimExt/gvimext.cpp + + +*** ../vim-7.3.257/src/GvimExt/gvimext.cpp 2010-08-15 21:57:29.000000000 +0200 +--- src/GvimExt/gvimext.cpp 2011-07-20 16:48:09.000000000 +0200 +*************** +*** 586,593 **** + + // Initialize m_cntOfHWnd to 0 + m_cntOfHWnd = 0; +! // Retrieve all the vim instances +! EnumWindows(EnumWindowsProc, (LPARAM)this); + + if (cbFiles > 1) + { +--- 586,608 ---- + + // Initialize m_cntOfHWnd to 0 + m_cntOfHWnd = 0; +! +! HKEY keyhandle; +! bool showExisting = true; +! +! // Check whether "Edit with existing Vim" entries are disabled. +! if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, +! KEY_READ, &keyhandle) == ERROR_SUCCESS) +! { +! if (RegQueryValueEx(keyhandle, "DisableEditWithExisting", 0, NULL, +! NULL, NULL) == ERROR_SUCCESS) +! showExisting = false; +! RegCloseKey(keyhandle); +! } +! +! // Retrieve all the vim instances, unless disabled. +! if (showExisting) +! EnumWindows(EnumWindowsProc, (LPARAM)this); + + if (cbFiles > 1) + { +*** ../vim-7.3.257/src/version.c 2011-07-20 16:36:35.000000000 +0200 +--- src/version.c 2011-07-20 16:54:34.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 258, + /**/ + +-- +What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics' +meaning 'bloodsucking creatures'. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.259 b/source/ap/vim/patches/7.3.259 new file mode 100644 index 000000000..91f9dfa13 --- /dev/null +++ b/source/ap/vim/patches/7.3.259 @@ -0,0 +1,503 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.259 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.259 +Problem: Equivalence classes only work for latin characters. +Solution: Add the Unicode equivalence characters. (Dominique Pelle) +Files: runtime/doc/pattern.txt, src/regexp.c, src/testdir/test44.in, + src/testdir/test44.ok + + +*** ../vim-7.3.258/runtime/doc/pattern.txt 2010-08-15 21:57:14.000000000 +0200 +--- runtime/doc/pattern.txt 2011-07-20 17:44:03.000000000 +0200 +*************** +*** 1027,1037 **** + These items only work for 8-bit characters. + */[[=* *[==]* + - An equivalence class. This means that characters are matched that +! have almost the same meaning, e.g., when ignoring accents. The form +! is: + [=a=] +- Currently this is only implemented for latin1. Also works for the +- latin1 characters in utf-8 and latin9. + */[[.* *[..]* + - A collation element. This currently simply accepts a single + character in the form: +--- 1036,1044 ---- + These items only work for 8-bit characters. + */[[=* *[==]* + - An equivalence class. This means that characters are matched that +! have almost the same meaning, e.g., when ignoring accents. This +! only works for Unicode, latin1 and latin9. The form is: + [=a=] + */[[.* *[..]* + - A collation element. This currently simply accepts a single + character in the form: +*** ../vim-7.3.258/src/regexp.c 2011-06-19 04:31:54.000000000 +0200 +--- src/regexp.c 2011-07-20 17:56:52.000000000 +0200 +*************** +*** 666,673 **** +--- 666,677 ---- + static void regc __ARGS((int b)); + #ifdef FEAT_MBYTE + static void regmbc __ARGS((int c)); ++ # define REGMBC(x) regmbc(x); ++ # define CASEMBC(x) case x: + #else + # define regmbc(c) regc(c) ++ # define REGMBC(x) ++ # define CASEMBC(x) + #endif + static void reginsert __ARGS((int, char_u *)); + static void reginsert_limits __ARGS((int, long, long, char_u *)); +*************** +*** 787,854 **** + switch (c) + { + case 'A': case '\300': case '\301': case '\302': + case '\303': case '\304': case '\305': + regmbc('A'); regmbc('\300'); regmbc('\301'); + regmbc('\302'); regmbc('\303'); regmbc('\304'); + regmbc('\305'); + return; + case 'C': case '\307': + regmbc('C'); regmbc('\307'); + return; + case 'E': case '\310': case '\311': case '\312': case '\313': + regmbc('E'); regmbc('\310'); regmbc('\311'); + regmbc('\312'); regmbc('\313'); + return; + case 'I': case '\314': case '\315': case '\316': case '\317': + regmbc('I'); regmbc('\314'); regmbc('\315'); + regmbc('\316'); regmbc('\317'); + return; + case 'N': case '\321': + regmbc('N'); regmbc('\321'); + return; + case 'O': case '\322': case '\323': case '\324': case '\325': +! case '\326': + regmbc('O'); regmbc('\322'); regmbc('\323'); + regmbc('\324'); regmbc('\325'); regmbc('\326'); + return; + case 'U': case '\331': case '\332': case '\333': case '\334': + regmbc('U'); regmbc('\331'); regmbc('\332'); + regmbc('\333'); regmbc('\334'); + return; + case 'Y': case '\335': + regmbc('Y'); regmbc('\335'); + return; + case 'a': case '\340': case '\341': case '\342': + case '\343': case '\344': case '\345': + regmbc('a'); regmbc('\340'); regmbc('\341'); + regmbc('\342'); regmbc('\343'); regmbc('\344'); + regmbc('\345'); + return; + case 'c': case '\347': + regmbc('c'); regmbc('\347'); + return; + case 'e': case '\350': case '\351': case '\352': case '\353': + regmbc('e'); regmbc('\350'); regmbc('\351'); + regmbc('\352'); regmbc('\353'); + return; + case 'i': case '\354': case '\355': case '\356': case '\357': + regmbc('i'); regmbc('\354'); regmbc('\355'); + regmbc('\356'); regmbc('\357'); + return; + case 'n': case '\361': + regmbc('n'); regmbc('\361'); + return; + case 'o': case '\362': case '\363': case '\364': case '\365': +! case '\366': + regmbc('o'); regmbc('\362'); regmbc('\363'); + regmbc('\364'); regmbc('\365'); regmbc('\366'); + return; + case 'u': case '\371': case '\372': case '\373': case '\374': + regmbc('u'); regmbc('\371'); regmbc('\372'); + regmbc('\373'); regmbc('\374'); + return; + case 'y': case '\375': case '\377': + regmbc('y'); regmbc('\375'); regmbc('\377'); + return; + } + #endif +--- 791,1085 ---- + switch (c) + { + case 'A': case '\300': case '\301': case '\302': ++ CASEMBC(0x100) CASEMBC(0x102) CASEMBC(0x104) CASEMBC(0x1cd) ++ CASEMBC(0x1de) CASEMBC(0x1e0) CASEMBC(0x1ea2) + case '\303': case '\304': case '\305': + regmbc('A'); regmbc('\300'); regmbc('\301'); + regmbc('\302'); regmbc('\303'); regmbc('\304'); + regmbc('\305'); ++ REGMBC(0x100) REGMBC(0x102) REGMBC(0x104) ++ REGMBC(0x1cd) REGMBC(0x1de) REGMBC(0x1e0) ++ REGMBC(0x1ea2) ++ return; ++ case 'B': CASEMBC(0x1e02) CASEMBC(0x1e06) ++ regmbc('B'); REGMBC(0x1e02) REGMBC(0x1e06) + return; + case 'C': case '\307': ++ CASEMBC(0x106) CASEMBC(0x108) CASEMBC(0x10a) CASEMBC(0x10c) + regmbc('C'); regmbc('\307'); ++ REGMBC(0x106) REGMBC(0x108) REGMBC(0x10a) ++ REGMBC(0x10c) ++ return; ++ case 'D': CASEMBC(0x10e) CASEMBC(0x110) CASEMBC(0x1e0a) ++ CASEMBC(0x1e0e) CASEMBC(0x1e10) ++ regmbc('D'); REGMBC(0x10e) REGMBC(0x110) ++ REGMBC(0x1e0a) REGMBC(0x1e0e) REGMBC(0x1e10) + return; + case 'E': case '\310': case '\311': case '\312': case '\313': ++ CASEMBC(0x112) CASEMBC(0x114) CASEMBC(0x116) CASEMBC(0x118) ++ CASEMBC(0x11a) CASEMBC(0x1eba) CASEMBC(0x1ebc) + regmbc('E'); regmbc('\310'); regmbc('\311'); + regmbc('\312'); regmbc('\313'); ++ REGMBC(0x112) REGMBC(0x114) REGMBC(0x116) ++ REGMBC(0x118) REGMBC(0x11a) REGMBC(0x1eba) ++ REGMBC(0x1ebc) ++ return; ++ case 'F': CASEMBC(0x1e1e) ++ regmbc('F'); REGMBC(0x1e1e) ++ return; ++ case 'G': CASEMBC(0x11c) CASEMBC(0x11e) CASEMBC(0x120) ++ CASEMBC(0x122) CASEMBC(0x1e4) CASEMBC(0x1e6) CASEMBC(0x1f4) ++ CASEMBC(0x1e20) ++ regmbc('G'); REGMBC(0x11c) REGMBC(0x11e) ++ REGMBC(0x120) REGMBC(0x122) REGMBC(0x1e4) ++ REGMBC(0x1e6) REGMBC(0x1f4) REGMBC(0x1e20) ++ return; ++ case 'H': CASEMBC(0x124) CASEMBC(0x126) CASEMBC(0x1e22) ++ CASEMBC(0x1e26) CASEMBC(0x1e28) ++ regmbc('H'); REGMBC(0x124) REGMBC(0x126) ++ REGMBC(0x1e22) REGMBC(0x1e26) REGMBC(0x1e28) + return; + case 'I': case '\314': case '\315': case '\316': case '\317': ++ CASEMBC(0x128) CASEMBC(0x12a) CASEMBC(0x12c) CASEMBC(0x12e) ++ CASEMBC(0x130) CASEMBC(0x1cf) CASEMBC(0x1ec8) + regmbc('I'); regmbc('\314'); regmbc('\315'); + regmbc('\316'); regmbc('\317'); ++ REGMBC(0x128) REGMBC(0x12a) REGMBC(0x12c) ++ REGMBC(0x12e) REGMBC(0x130) REGMBC(0x1cf) ++ REGMBC(0x1ec8) ++ return; ++ case 'J': CASEMBC(0x134) ++ regmbc('J'); REGMBC(0x134) ++ return; ++ case 'K': CASEMBC(0x136) CASEMBC(0x1e8) CASEMBC(0x1e30) ++ CASEMBC(0x1e34) ++ regmbc('K'); REGMBC(0x136) REGMBC(0x1e8) ++ REGMBC(0x1e30) REGMBC(0x1e34) ++ return; ++ case 'L': CASEMBC(0x139) CASEMBC(0x13b) CASEMBC(0x13d) ++ CASEMBC(0x13f) CASEMBC(0x141) CASEMBC(0x1e3a) ++ regmbc('L'); REGMBC(0x139) REGMBC(0x13b) ++ REGMBC(0x13d) REGMBC(0x13f) REGMBC(0x141) ++ REGMBC(0x1e3a) ++ return; ++ case 'M': CASEMBC(0x1e3e) CASEMBC(0x1e40) ++ regmbc('M'); REGMBC(0x1e3e) REGMBC(0x1e40) + return; + case 'N': case '\321': ++ CASEMBC(0x143) CASEMBC(0x145) CASEMBC(0x147) CASEMBC(0x1e44) ++ CASEMBC(0x1e48) + regmbc('N'); regmbc('\321'); ++ REGMBC(0x143) REGMBC(0x145) REGMBC(0x147) ++ REGMBC(0x1e44) REGMBC(0x1e48) + return; + case 'O': case '\322': case '\323': case '\324': case '\325': +! case '\326': case '\330': +! CASEMBC(0x14c) CASEMBC(0x14e) CASEMBC(0x150) CASEMBC(0x1a0) +! CASEMBC(0x1d1) CASEMBC(0x1ea) CASEMBC(0x1ec) CASEMBC(0x1ece) + regmbc('O'); regmbc('\322'); regmbc('\323'); + regmbc('\324'); regmbc('\325'); regmbc('\326'); ++ regmbc('\330'); ++ REGMBC(0x14c) REGMBC(0x14e) REGMBC(0x150) ++ REGMBC(0x1a0) REGMBC(0x1d1) REGMBC(0x1ea) ++ REGMBC(0x1ec) REGMBC(0x1ece) ++ return; ++ case 'P': case 0x1e54: case 0x1e56: ++ regmbc('P'); REGMBC(0x1e54) REGMBC(0x1e56) ++ return; ++ case 'R': CASEMBC(0x154) CASEMBC(0x156) CASEMBC(0x158) ++ CASEMBC(0x1e58) CASEMBC(0x1e5e) ++ regmbc('R'); REGMBC(0x154) REGMBC(0x156) REGMBC(0x158) ++ REGMBC(0x1e58) REGMBC(0x1e5e) ++ return; ++ case 'S': CASEMBC(0x15a) CASEMBC(0x15c) CASEMBC(0x15e) ++ CASEMBC(0x160) CASEMBC(0x1e60) ++ regmbc('S'); REGMBC(0x15a) REGMBC(0x15c) ++ REGMBC(0x15e) REGMBC(0x160) REGMBC(0x1e60) ++ return; ++ case 'T': CASEMBC(0x162) CASEMBC(0x164) CASEMBC(0x166) ++ CASEMBC(0x1e6a) CASEMBC(0x1e6e) ++ regmbc('T'); REGMBC(0x162) REGMBC(0x164) ++ REGMBC(0x166) REGMBC(0x1e6a) REGMBC(0x1e6e) + return; + case 'U': case '\331': case '\332': case '\333': case '\334': ++ CASEMBC(0x168) CASEMBC(0x16a) CASEMBC(0x16c) CASEMBC(0x16e) ++ CASEMBC(0x170) CASEMBC(0x172) CASEMBC(0x1af) CASEMBC(0x1d3) ++ CASEMBC(0x1ee6) + regmbc('U'); regmbc('\331'); regmbc('\332'); + regmbc('\333'); regmbc('\334'); ++ REGMBC(0x168) REGMBC(0x16a) REGMBC(0x16c) ++ REGMBC(0x16e) REGMBC(0x170) REGMBC(0x172) ++ REGMBC(0x1af) REGMBC(0x1d3) REGMBC(0x1ee6) ++ return; ++ case 'V': CASEMBC(0x1e7c) ++ regmbc('V'); REGMBC(0x1e7c) ++ return; ++ case 'W': CASEMBC(0x174) CASEMBC(0x1e80) CASEMBC(0x1e82) ++ CASEMBC(0x1e84) CASEMBC(0x1e86) ++ regmbc('W'); REGMBC(0x174) REGMBC(0x1e80) ++ REGMBC(0x1e82) REGMBC(0x1e84) REGMBC(0x1e86) ++ return; ++ case 'X': CASEMBC(0x1e8a) CASEMBC(0x1e8c) ++ regmbc('X'); REGMBC(0x1e8a) REGMBC(0x1e8c) + return; + case 'Y': case '\335': ++ CASEMBC(0x176) CASEMBC(0x178) CASEMBC(0x1e8e) CASEMBC(0x1ef2) ++ CASEMBC(0x1ef6) CASEMBC(0x1ef8) + regmbc('Y'); regmbc('\335'); ++ REGMBC(0x176) REGMBC(0x178) REGMBC(0x1e8e) ++ REGMBC(0x1ef2) REGMBC(0x1ef6) REGMBC(0x1ef8) ++ return; ++ case 'Z': CASEMBC(0x179) CASEMBC(0x17b) CASEMBC(0x17d) ++ CASEMBC(0x1b5) CASEMBC(0x1e90) CASEMBC(0x1e94) ++ regmbc('Z'); REGMBC(0x179) REGMBC(0x17b) ++ REGMBC(0x17d) REGMBC(0x1b5) REGMBC(0x1e90) ++ REGMBC(0x1e94) + return; + case 'a': case '\340': case '\341': case '\342': + case '\343': case '\344': case '\345': ++ CASEMBC(0x101) CASEMBC(0x103) CASEMBC(0x105) CASEMBC(0x1ce) ++ CASEMBC(0x1df) CASEMBC(0x1e1) CASEMBC(0x1ea3) + regmbc('a'); regmbc('\340'); regmbc('\341'); + regmbc('\342'); regmbc('\343'); regmbc('\344'); + regmbc('\345'); ++ REGMBC(0x101) REGMBC(0x103) REGMBC(0x105) ++ REGMBC(0x1ce) REGMBC(0x1df) REGMBC(0x1e1) ++ REGMBC(0x1ea3) ++ return; ++ case 'b': CASEMBC(0x1e03) CASEMBC(0x1e07) ++ regmbc('b'); REGMBC(0x1e03) REGMBC(0x1e07) + return; + case 'c': case '\347': ++ CASEMBC(0x107) CASEMBC(0x109) CASEMBC(0x10b) CASEMBC(0x10d) + regmbc('c'); regmbc('\347'); ++ REGMBC(0x107) REGMBC(0x109) REGMBC(0x10b) ++ REGMBC(0x10d) ++ return; ++ case 'd': CASEMBC(0x10f) CASEMBC(0x111) CASEMBC(0x1d0b) ++ CASEMBC(0x1e11) ++ regmbc('d'); REGMBC(0x10f) REGMBC(0x111) ++ REGMBC(0x1e0b) REGMBC(0x01e0f) REGMBC(0x1e11) + return; + case 'e': case '\350': case '\351': case '\352': case '\353': ++ CASEMBC(0x113) CASEMBC(0x115) CASEMBC(0x117) CASEMBC(0x119) ++ CASEMBC(0x11b) CASEMBC(0x1ebb) CASEMBC(0x1ebd) + regmbc('e'); regmbc('\350'); regmbc('\351'); + regmbc('\352'); regmbc('\353'); ++ REGMBC(0x113) REGMBC(0x115) REGMBC(0x117) ++ REGMBC(0x119) REGMBC(0x11b) REGMBC(0x1ebb) ++ REGMBC(0x1ebd) ++ return; ++ case 'f': CASEMBC(0x1e1f) ++ regmbc('f'); REGMBC(0x1e1f) ++ return; ++ case 'g': CASEMBC(0x11d) CASEMBC(0x11f) CASEMBC(0x121) ++ CASEMBC(0x123) CASEMBC(0x1e5) CASEMBC(0x1e7) CASEMBC(0x1f5) ++ CASEMBC(0x1e21) ++ regmbc('g'); REGMBC(0x11d) REGMBC(0x11f) ++ REGMBC(0x121) REGMBC(0x123) REGMBC(0x1e5) ++ REGMBC(0x1e7) REGMBC(0x1f5) REGMBC(0x1e21) ++ return; ++ case 'h': CASEMBC(0x125) CASEMBC(0x127) CASEMBC(0x1e23) ++ CASEMBC(0x1e27) CASEMBC(0x1e29) CASEMBC(0x1e96) ++ regmbc('h'); REGMBC(0x125) REGMBC(0x127) ++ REGMBC(0x1e23) REGMBC(0x1e27) REGMBC(0x1e29) ++ REGMBC(0x1e96) + return; + case 'i': case '\354': case '\355': case '\356': case '\357': ++ CASEMBC(0x129) CASEMBC(0x12b) CASEMBC(0x12d) CASEMBC(0x12f) ++ CASEMBC(0x1d0) CASEMBC(0x1ec9) + regmbc('i'); regmbc('\354'); regmbc('\355'); + regmbc('\356'); regmbc('\357'); ++ REGMBC(0x129) REGMBC(0x12b) REGMBC(0x12d) ++ REGMBC(0x12f) REGMBC(0x1d0) REGMBC(0x1ec9) ++ return; ++ case 'j': CASEMBC(0x135) CASEMBC(0x1f0) ++ regmbc('j'); REGMBC(0x135) REGMBC(0x1f0) ++ return; ++ case 'k': CASEMBC(0x137) CASEMBC(0x1e9) CASEMBC(0x1e31) ++ CASEMBC(0x1e35) ++ regmbc('k'); REGMBC(0x137) REGMBC(0x1e9) ++ REGMBC(0x1e31) REGMBC(0x1e35) ++ return; ++ case 'l': CASEMBC(0x13a) CASEMBC(0x13c) CASEMBC(0x13e) ++ CASEMBC(0x140) CASEMBC(0x142) CASEMBC(0x1e3b) ++ regmbc('l'); REGMBC(0x13a) REGMBC(0x13c) ++ REGMBC(0x13e) REGMBC(0x140) REGMBC(0x142) ++ REGMBC(0x1e3b) ++ return; ++ case 'm': CASEMBC(0x1e3f) CASEMBC(0x1e41) ++ regmbc('m'); REGMBC(0x1e3f) REGMBC(0x1e41) + return; + case 'n': case '\361': ++ CASEMBC(0x144) CASEMBC(0x146) CASEMBC(0x148) CASEMBC(0x149) ++ CASEMBC(0x1e45) CASEMBC(0x1e49) + regmbc('n'); regmbc('\361'); ++ REGMBC(0x144) REGMBC(0x146) REGMBC(0x148) ++ REGMBC(0x149) REGMBC(0x1e45) REGMBC(0x1e49) + return; + case 'o': case '\362': case '\363': case '\364': case '\365': +! case '\366': case '\370': +! CASEMBC(0x14d) CASEMBC(0x14f) CASEMBC(0x151) CASEMBC(0x1a1) +! CASEMBC(0x1d2) CASEMBC(0x1eb) CASEMBC(0x1ed) CASEMBC(0x1ecf) + regmbc('o'); regmbc('\362'); regmbc('\363'); + regmbc('\364'); regmbc('\365'); regmbc('\366'); ++ regmbc('\370'); ++ REGMBC(0x14d) REGMBC(0x14f) REGMBC(0x151) ++ REGMBC(0x1a1) REGMBC(0x1d2) REGMBC(0x1eb) ++ REGMBC(0x1ed) REGMBC(0x1ecf) ++ return; ++ case 'p': CASEMBC(0x1e55) CASEMBC(0x1e57) ++ regmbc('p'); REGMBC(0x1e55) REGMBC(0x1e57) ++ return; ++ case 'r': CASEMBC(0x155) CASEMBC(0x157) CASEMBC(0x159) ++ CASEMBC(0x1e59) CASEMBC(0x1e5f) ++ regmbc('r'); REGMBC(0x155) REGMBC(0x157) REGMBC(0x159) ++ REGMBC(0x1e59) REGMBC(0x1e5f) ++ return; ++ case 's': CASEMBC(0x15b) CASEMBC(0x15d) CASEMBC(0x15f) ++ CASEMBC(0x161) CASEMBC(0x1e61) ++ regmbc('s'); REGMBC(0x15b) REGMBC(0x15d) ++ REGMBC(0x15f) REGMBC(0x161) REGMBC(0x1e61) ++ return; ++ case 't': CASEMBC(0x163) CASEMBC(0x165) CASEMBC(0x167) ++ CASEMBC(0x1e6b) CASEMBC(0x1e6f) CASEMBC(0x1e97) ++ regmbc('t'); REGMBC(0x163) REGMBC(0x165) REGMBC(0x167) ++ REGMBC(0x1e6b) REGMBC(0x1e6f) REGMBC(0x1e97) + return; + case 'u': case '\371': case '\372': case '\373': case '\374': ++ CASEMBC(0x169) CASEMBC(0x16b) CASEMBC(0x16d) CASEMBC(0x16f) ++ CASEMBC(0x171) CASEMBC(0x173) CASEMBC(0x1b0) CASEMBC(0x1d4) ++ CASEMBC(0x1ee7) + regmbc('u'); regmbc('\371'); regmbc('\372'); + regmbc('\373'); regmbc('\374'); ++ REGMBC(0x169) REGMBC(0x16b) REGMBC(0x16d) ++ REGMBC(0x16f) REGMBC(0x171) REGMBC(0x173) ++ REGMBC(0x1b0) REGMBC(0x1d4) REGMBC(0x1ee7) ++ return; ++ case 'v': CASEMBC(0x1e7d) ++ regmbc('v'); REGMBC(0x1e7d) ++ return; ++ case 'w': CASEMBC(0x175) CASEMBC(0x1e81) CASEMBC(0x1e83) ++ CASEMBC(0x1e85) CASEMBC(0x1e87) CASEMBC(0x1e98) ++ regmbc('w'); REGMBC(0x175) REGMBC(0x1e81) ++ REGMBC(0x1e83) REGMBC(0x1e85) REGMBC(0x1e87) ++ REGMBC(0x1e98) ++ return; ++ case 'x': CASEMBC(0x1e8b) CASEMBC(0x1e8d) ++ regmbc('x'); REGMBC(0x1e8b) REGMBC(0x1e8d) + return; + case 'y': case '\375': case '\377': ++ CASEMBC(0x177) CASEMBC(0x1e8f) CASEMBC(0x1e99) ++ CASEMBC(0x1ef3) CASEMBC(0x1ef7) CASEMBC(0x1ef9) + regmbc('y'); regmbc('\375'); regmbc('\377'); ++ REGMBC(0x177) REGMBC(0x1e8f) REGMBC(0x1e99) ++ REGMBC(0x1ef3) REGMBC(0x1ef7) REGMBC(0x1ef9) ++ return; ++ case 'z': CASEMBC(0x17a) CASEMBC(0x17c) CASEMBC(0x17e) ++ CASEMBC(0x1b6) CASEMBC(0x1e91) CASEMBC(0x1e95) ++ regmbc('z'); REGMBC(0x17a) REGMBC(0x17c) ++ REGMBC(0x17e) REGMBC(0x1b6) REGMBC(0x1e91) ++ REGMBC(0x1e95) + return; + } + #endif +*************** +*** 2468,2473 **** +--- 2699,2706 ---- + regmbc(c) + int c; + { ++ if (!has_mbyte && c > 0xff) ++ return; + if (regcode == JUST_CALC_SIZE) + regsize += (*mb_char2len)(c); + else +*************** +*** 2588,2594 **** + else + offset = (int)(val - scan); + /* When the offset uses more than 16 bits it can no longer fit in the two +! * bytes avaliable. Use a global flag to avoid having to check return + * values in too many places. */ + if (offset > 0xffff) + reg_toolong = TRUE; +--- 2821,2827 ---- + else + offset = (int)(val - scan); + /* When the offset uses more than 16 bits it can no longer fit in the two +! * bytes available. Use a global flag to avoid having to check return + * values in too many places. */ + if (offset > 0xffff) + reg_toolong = TRUE; +*** ../vim-7.3.258/src/testdir/test44.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test44.in 2011-07-20 17:36:49.000000000 +0200 +*************** +*** 27,32 **** +--- 27,34 ---- + x/\%U12345678 + x/[\U1234abcd\u1234\uabcd] + x/\%d21879b ++ x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e ++ x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e + x:?^1?,$w! test.out + :e! test.out + G:put =matchstr(\"×בגד\", \".\", 0, 2) " ב +*************** +*** 53,55 **** +--- 55,59 ---- + e ü’…™¸y + f ü’Š¯z + g aå•·bb ++ h AÀÃÂÃÄÅĀĂĄÇǞǠẢ BḂḆ CÇĆĈĊČ DÄŽÄḊḎḠEÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÃŒÃÃŽÃĨĪĬĮİÇỈ JÄ´ KĶǨḰḴ LĹĻĽĿÅḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎÅƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ Vá¹¼ WŴẀẂẄẆ XẊẌ YÃŶŸẎỲỶỸ ZŹŻŽƵáºáº” ++ i aàáâãäåÄăąǎǟǡả bḃḇ cÃ§Ä‡Ä‰Ä‹Ä dÄđḋá¸á¸‘ eèéêëēĕėęěẻẽ fḟ gÄğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįÇỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṠnñńņňʼnṅṉ oòóôõöøÅÅÅ‘Æ¡Ç’Ç«Ç­á» pṕṗ q rŕŗřṙṟ sÅ›Åşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vá¹½ wŵáºáºƒáº…ẇẘ xẋẠyýÿŷáºáº™á»³á»·á»¹ zźżžƶẑẕ +*** ../vim-7.3.258/src/testdir/test44.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test44.ok 2011-07-20 17:36:49.000000000 +0200 +*************** +*** 14,19 **** +--- 14,21 ---- + e y + f z + g abb ++ h AÀÃÂÃÄÅĀĂĄÇǞǠẢ BḂḆ CÇĆĈĊČ DÄŽÄḊḎḠEÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÃŒÃÃŽÃĨĪĬĮİÇỈ JÄ´ KĶǨḰḴ LĹĻĽĿÅḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎÅƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ Vá¹¼ WŴẀẂẄẆ XẊẌ YÃŶŸẎỲỶỸ ZŹŻŽƵẠ++ i aàáâãäåÄăąǎǟǡả bḃḇ cÃ§Ä‡Ä‰Ä‹Ä dÄđḋá¸á¸‘ eèéêëēĕėęěẻẽ fḟ gÄğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįÇỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṠnñńņňʼnṅṉ oòóôõöøÅÅÅ‘Æ¡Ç’Ç«Ç­á» pṕṗ q rŕŗřṙṟ sÅ›Åşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vá¹½ wŵáºáºƒáº…ẇẘ xẋẠyýÿŷáºáº™á»³á»·á»¹ zźżžƶẑ + ב + בג + × +*** ../vim-7.3.258/src/version.c 2011-07-20 17:27:17.000000000 +0200 +--- src/version.c 2011-07-20 17:38:32.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 259, + /**/ + +-- +Not too long ago, compress was something you did to garbage... + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.260 b/source/ap/vim/patches/7.3.260 new file mode 100644 index 000000000..ba9af57aa --- /dev/null +++ b/source/ap/vim/patches/7.3.260 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.260 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.260 +Problem: CursorHold triggers on an incomplete mapping. (Will Gray) +Solution: Don't trigger CursorHold when there is typeahead. +Files: src/fileio.c + + +*** ../vim-7.3.259/src/fileio.c 2011-05-19 17:25:36.000000000 +0200 +--- src/fileio.c 2011-07-20 18:22:16.000000000 +0200 +*************** +*** 9044,9050 **** + { + int state; + +! if (!did_cursorhold && has_cursorhold() && !Recording + #ifdef FEAT_INS_EXPAND + && !ins_compl_active() + #endif +--- 9044,9053 ---- + { + int state; + +! if (!did_cursorhold +! && has_cursorhold() +! && !Recording +! && typebuf.tb_len == 0 + #ifdef FEAT_INS_EXPAND + && !ins_compl_active() + #endif +*************** +*** 9935,9940 **** +--- 9938,9945 ---- + if ((c == ';' || c == '>') && match == FALSE) + { + *pattern = NUL; /* Terminate the string */ ++ /* TODO: match with 'filetype' of buffer that "fname" comes ++ * from. */ + match = mch_check_filetype(fname, type_start); + *pattern = c; /* Restore the terminator */ + type_start = pattern + 1; +*** ../vim-7.3.259/src/version.c 2011-07-20 17:58:14.000000000 +0200 +--- src/version.c 2011-07-20 18:25:15.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 260, + /**/ + +-- +LAUNCELOT: At last! A call! A cry of distress ... + (he draws his sword, and turns to CONCORDE) + Concorde! Brave, Concorde ... you shall not have died in vain! +CONCORDE: I'm not quite dead, sir ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.261 b/source/ap/vim/patches/7.3.261 new file mode 100644 index 000000000..4c03f6b57 --- /dev/null +++ b/source/ap/vim/patches/7.3.261 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.261 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.261 +Problem: G++ error message errornously recognized as error. +Solution: Ignore "In file included from" line also when it ends in a colon. + (Fernando Castillo) +Files: src/option.h + + +*** ../vim-7.3.260/src/option.h 2011-06-26 05:36:07.000000000 +0200 +--- src/option.h 2011-07-27 13:44:08.000000000 +0200 +*************** +*** 33,39 **** + # ifdef EBCDIC + #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-Gfrom %f:%l:%c,%-Gfrom %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +--- 33,39 ---- + # ifdef EBCDIC + #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # else +! #define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-Gfrom %f:%l:%c,%-Gfrom %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" + # endif + # endif + # endif +*** ../vim-7.3.260/src/version.c 2011-07-20 18:29:33.000000000 +0200 +--- src/version.c 2011-07-27 13:46:23.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 261, + /**/ + +-- +Have you heard about the new Barbie doll? It's called Divorce +Barbie. It comes with all of Ken's stuff. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.262 b/source/ap/vim/patches/7.3.262 new file mode 100644 index 000000000..b3bd5cd81 --- /dev/null +++ b/source/ap/vim/patches/7.3.262 @@ -0,0 +1,1356 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.262 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.262 +Problem: Photon code style doesn't match Vim style. +Solution: Clean up some of it. (Elias Diem) +Files: src/gui_photon.c + + +*** ../vim-7.3.261/src/gui_photon.c 2011-01-17 20:08:03.000000000 +0100 +--- src/gui_photon.c 2011-07-27 14:07:02.000000000 +0200 +*************** +*** 32,40 **** + #endif + + #define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a[0])) +! #define RGB(r,g,b) PgRGB(r,g,b) + +! #define EVENT_BUFFER_SIZE sizeof( PhEvent_t ) + 1000 + + /* Some defines for gui_mch_mousehide() */ + #define MOUSE_HIDE TRUE +--- 32,40 ---- + #endif + + #define ARRAY_LENGTH(a) (sizeof(a) / sizeof(a[0])) +! #define RGB(r, g, b) PgRGB(r, g, b) + +! #define EVENT_BUFFER_SIZE sizeof(PhEvent_t) + 1000 + + /* Some defines for gui_mch_mousehide() */ + #define MOUSE_HIDE TRUE +*************** +*** 206,258 **** + static PtCallbackF_t gui_ph_handle_menu_unrealized; + + #ifdef USE_PANEL_GROUP +! static void gui_ph_get_panelgroup_margins( short*, short*, short*, short* ); + #endif + + #ifdef FEAT_TOOLBAR +! static PhImage_t *gui_ph_toolbar_find_icon( vimmenu_T *menu ); + #endif + +! static void gui_ph_draw_start( void ); +! static void gui_ph_draw_end( void ); + + /* Set the text for the balloon */ +! static PtWidget_t * gui_ph_show_tooltip( PtWidget_t *window, + PtWidget_t *widget, + int position, + char *text, + char *font, + PgColor_t fill_color, +! PgColor_t text_color ); + + /****************************************************************************/ + +! static PtWidget_t * gui_ph_show_tooltip( PtWidget_t *window, + PtWidget_t *widget, + int position, + char *text, + char *font, + PgColor_t fill_color, +! PgColor_t text_color ) + { + PtArg_t arg; + vimmenu_T *menu; + char_u *tooltip; + +! PtSetArg( &arg, Pt_ARG_POINTER, &menu, 0 ); +! PtGetResources( widget, 1, &arg ); + + /* Override the text and position */ + + tooltip = text; +! if( menu != NULL ) + { + int index = MENU_INDEX_TIP; +! if( menu->strings[ index ] != NULL ) + tooltip = menu->strings[ index ]; + } + +! return( PtInflateBalloon( + window, + widget, + /* Don't put the balloon at the bottom, +--- 206,258 ---- + static PtCallbackF_t gui_ph_handle_menu_unrealized; + + #ifdef USE_PANEL_GROUP +! static void gui_ph_get_panelgroup_margins(short*, short*, short*, short*); + #endif + + #ifdef FEAT_TOOLBAR +! static PhImage_t *gui_ph_toolbar_find_icon(vimmenu_T *menu); + #endif + +! static void gui_ph_draw_start(void); +! static void gui_ph_draw_end(void); + + /* Set the text for the balloon */ +! static PtWidget_t * gui_ph_show_tooltip(PtWidget_t *window, + PtWidget_t *widget, + int position, + char *text, + char *font, + PgColor_t fill_color, +! PgColor_t text_color); + + /****************************************************************************/ + +! static PtWidget_t * gui_ph_show_tooltip(PtWidget_t *window, + PtWidget_t *widget, + int position, + char *text, + char *font, + PgColor_t fill_color, +! PgColor_t text_color) + { + PtArg_t arg; + vimmenu_T *menu; + char_u *tooltip; + +! PtSetArg(&arg, Pt_ARG_POINTER, &menu, 0); +! PtGetResources(widget, 1, &arg); + + /* Override the text and position */ + + tooltip = text; +! if (menu != NULL) + { + int index = MENU_INDEX_TIP; +! if (menu->strings[ index ] != NULL) + tooltip = menu->strings[ index ]; + } + +! return PtInflateBalloon( + window, + widget, + /* Don't put the balloon at the bottom, +*************** +*** 261,285 **** + tooltip, + font, + fill_color, +! text_color ) ); + } + + static void +! gui_ph_resize_container( void ) + { + PhArea_t area; + +! PtWidgetArea( gui.vimWindow, &area ); +! PtWidgetPos ( gui.vimContainer, &area.pos ); + +! PtSetResource( gui.vimContainer, Pt_ARG_AREA, &area, 0 ); + } + + static int + gui_ph_handle_menu_resize( + PtWidget_t *widget, + void *other, +! PtCallbackInfo_t *info ) + { + PtContainerCallback_t *sizes = info->cbdata; + PtWidget_t *container; +--- 261,285 ---- + tooltip, + font, + fill_color, +! text_color); + } + + static void +! gui_ph_resize_container(void) + { + PhArea_t area; + +! PtWidgetArea(gui.vimWindow, &area); +! PtWidgetPos (gui.vimContainer, &area.pos); + +! PtSetResource(gui.vimContainer, Pt_ARG_AREA, &area, 0); + } + + static int + gui_ph_handle_menu_resize( + PtWidget_t *widget, + void *other, +! PtCallbackInfo_t *info) + { + PtContainerCallback_t *sizes = info->cbdata; + PtWidget_t *container; +*************** +*** 291,297 **** + /* Because vim treats the toolbar and menubar separately, + * and here they're lumped together into a PtToolbarGroup, + * we only need either menu_height or toolbar_height set at once */ +! if( gui.menu_is_active ) + { + gui.menu_height = height; + gui.toolbar_height = 0; +--- 291,297 ---- + /* Because vim treats the toolbar and menubar separately, + * and here they're lumped together into a PtToolbarGroup, + * we only need either menu_height or toolbar_height set at once */ +! if (gui.menu_is_active) + { + gui.menu_height = height; + gui.toolbar_height = 0; +*************** +*** 310,325 **** + container = gui.vimContainer; + #endif + +! PtSetResource( container, Pt_ARG_POS, &below_menu, 0 ); + + gui_ph_resize_container(); + + #ifdef USE_PANEL_GROUP + gui_ph_get_panelgroup_margins( + &pg_margin_top, &pg_margin_bottom, +! &pg_margin_left, &pg_margin_right ); + #endif +! return( Pt_CONTINUE ); + } + + /* +--- 310,325 ---- + container = gui.vimContainer; + #endif + +! PtSetResource(container, Pt_ARG_POS, &below_menu, 0); + + gui_ph_resize_container(); + + #ifdef USE_PANEL_GROUP + gui_ph_get_panelgroup_margins( + &pg_margin_top, &pg_margin_bottom, +! &pg_margin_left, &pg_margin_right); + #endif +! return Pt_CONTINUE; + } + + /* +*************** +*** 330,352 **** + gui_ph_handle_timer_cursor( + PtWidget_t *widget, + void *data, +! PtCallbackInfo_t *info ) + { +! if( blink_state == BLINK_ON ) + { + gui_undraw_cursor(); + blink_state = BLINK_OFF; +! PtSetResource( gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL, +! blink_offtime, 0 ); + } + else + { + gui_update_cursor(TRUE, FALSE); + blink_state = BLINK_ON; +! PtSetResource( gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL, +! blink_ontime, 0 ); + } +! return( Pt_CONTINUE ); + } + + static int +--- 330,352 ---- + gui_ph_handle_timer_cursor( + PtWidget_t *widget, + void *data, +! PtCallbackInfo_t *info) + { +! if (blink_state == BLINK_ON) + { + gui_undraw_cursor(); + blink_state = BLINK_OFF; +! PtSetResource(gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL, +! blink_offtime, 0); + } + else + { + gui_update_cursor(TRUE, FALSE); + blink_state = BLINK_ON; +! PtSetResource(gui_ph_timer_cursor, Pt_ARG_TIMER_INITIAL, +! blink_ontime, 0); + } +! return Pt_CONTINUE; + } + + static int +*************** +*** 354,360 **** + { + is_timeout = TRUE; + +! return( Pt_CONTINUE ); + } + + static int +--- 354,360 ---- + { + is_timeout = TRUE; + +! return Pt_CONTINUE; + } + + static int +*************** +*** 402,408 **** + break; + } + +! return( Pt_CONTINUE ); + } + + static int +--- 402,408 ---- + break; + } + +! return Pt_CONTINUE; + } + + static int +*************** +*** 426,438 **** + + case Pt_SCROLL_SET: + /* FIXME: return straight away here? */ +! return( Pt_CONTINUE ); + break; + } + + gui_drag_scrollbar(sb, value, dragging); + } +! return( Pt_CONTINUE ); + } + + static int +--- 426,438 ---- + + case Pt_SCROLL_SET: + /* FIXME: return straight away here? */ +! return Pt_CONTINUE; + break; + } + + gui_drag_scrollbar(sb, value, dragging); + } +! return Pt_CONTINUE; + } + + static int +*************** +*** 453,459 **** + /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */ + if( key->key_flags & Pk_KF_Compose ) + { +! return( Pt_CONTINUE ); + } + + if( (key->key_flags & Pk_KF_Cap_Valid) && +--- 453,459 ---- + /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */ + if( key->key_flags & Pk_KF_Compose ) + { +! return Pt_CONTINUE; + } + + if( (key->key_flags & Pk_KF_Cap_Valid) && +*************** +*** 473,479 **** + gui_is_menu_shortcut( key->key_cap ) ) ) ) + { + /* Fallthrough and let photon look for the hotkey */ +! return( Pt_CONTINUE ); + } + #endif + +--- 473,479 ---- + gui_is_menu_shortcut( key->key_cap ) ) ) ) + { + /* Fallthrough and let photon look for the hotkey */ +! return Pt_CONTINUE; + } + #endif + +*************** +*** 544,550 **** + add_to_input_buf( string, len ); + } + +! return( Pt_CONSUME ); + } + len = 0; + #endif +--- 544,550 ---- + add_to_input_buf( string, len ); + } + +! return Pt_CONSUME; + } + len = 0; + #endif +*************** +*** 579,585 **** + } + else + { +! return( Pt_CONTINUE ); + } + } + else +--- 579,585 ---- + } + else + { +! return Pt_CONTINUE; + } + } + else +*************** +*** 622,632 **** + if( len > 0 ) + { + add_to_input_buf( string, len ); +! return( Pt_CONSUME ); + } + } + +! return( Pt_CONTINUE ); + } + + static int +--- 622,632 ---- + if( len > 0 ) + { + add_to_input_buf( string, len ); +! return Pt_CONSUME; + } + } + +! return Pt_CONTINUE; + } + + static int +*************** +*** 652,658 **** + if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON ) + { + gui_mouse_moved( mouse_x, mouse_y ); +! return( Pt_CONTINUE ); + } + + if( pointer->key_mods & Pk_KM_Shift ) +--- 652,658 ---- + if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON ) + { + gui_mouse_moved( mouse_x, mouse_y ); +! return Pt_CONTINUE; + } + + if( pointer->key_mods & Pk_KM_Shift ) +*************** +*** 702,708 **** + gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers ); + } + +! return( Pt_CONTINUE ); + } + + /* Handle a focus change of the PtRaw widget */ +--- 702,708 ---- + gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers ); + } + +! return Pt_CONTINUE; + } + + /* Handle a focus change of the PtRaw widget */ +*************** +*** 721,727 **** + PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON, + gui_ph_handle_mouse, NULL ); + } +! return( Pt_CONTINUE ); + } + + static void +--- 721,727 ---- + PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON, + gui_ph_handle_mouse, NULL ); + } +! return Pt_CONTINUE; + } + + static void +*************** +*** 793,799 **** + PtRealizeWidget( menu->submenu_id ); + } + +! return( Pt_CONTINUE ); + } + + /* This is used for pulldown/popup menus and also toolbar buttons */ +--- 793,799 ---- + PtRealizeWidget( menu->submenu_id ); + } + +! return Pt_CONTINUE; + } + + /* This is used for pulldown/popup menus and also toolbar buttons */ +*************** +*** 805,811 **** + vimmenu_T *menu = (vimmenu_T *) data; + gui_menu_cb( menu ); + } +! return( Pt_CONTINUE ); + } + + /* Stop focus from disappearing into the menubar... */ +--- 805,811 ---- + vimmenu_T *menu = (vimmenu_T *) data; + gui_menu_cb( menu ); + } +! return Pt_CONTINUE; + } + + /* Stop focus from disappearing into the menubar... */ +*************** +*** 816,822 **** + PtCallbackInfo_t *info ) + { + PtGiveFocus( gui.vimTextArea, NULL ); +! return( Pt_CONTINUE ); + } + + static int +--- 816,822 ---- + PtCallbackInfo_t *info ) + { + PtGiveFocus( gui.vimTextArea, NULL ); +! return Pt_CONTINUE; + } + + static int +*************** +*** 826,832 **** + PtCallbackInfo_t *info ) + { + gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH ); +! return( Pt_CONTINUE ); + } + + /****************************************************************************/ +--- 826,832 ---- + PtCallbackInfo_t *info ) + { + gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH ); +! return Pt_CONTINUE; + } + + /****************************************************************************/ +*************** +*** 878,884 **** + ( STRCMP( items->dname, name ) != 0 ) ) + items = items->next; + } +! return( items ); + } + + static void +--- 878,884 ---- + ( STRCMP( items->dname, name ) != 0 ) ) + items = items->next; + } +! return items; + } + + static void +*************** +*** 927,933 **** + gui_menu_cb( menu ); + } + } +! return( Pt_CONTINUE ); + } + + static void +--- 927,933 ---- + gui_menu_cb( menu ); + } + } +! return Pt_CONTINUE; + } + + static void +*************** +*** 974,983 **** + mark++; + + if( *mark == ')' ) +! return( TRUE); + } + } +! return( FALSE ); + } + + static void +--- 974,983 ---- + mark++; + + if( *mark == ')' ) +! return TRUE; + } + } +! return FALSE; + } + + static void +*************** +*** 1057,1063 **** + gui_ph_pg_remove_buffer( menu->dname ); + } + +! return( Pt_CONTINUE ); + } + #endif + +--- 1057,1063 ---- + gui_ph_pg_remove_buffer( menu->dname ); + } + +! return Pt_CONTINUE; + } + #endif + +*************** +*** 1071,1077 **** + PtContainerHold( gui.vimContainer ); + } + +! return( Pt_CONTINUE ); + } + + /****************************************************************************/ +--- 1071,1077 ---- + PtContainerHold( gui.vimContainer ); + } + +! return Pt_CONTINUE; + } + + /****************************************************************************/ +*************** +*** 1126,1132 **** + + gui.event_buffer = (PhEvent_t *) alloc( EVENT_BUFFER_SIZE ); + if( gui.event_buffer == NULL ) +! return( FAIL ); + + /* Get a translation so we can convert from ISO Latin-1 to UTF */ + charset_translate = PxTranslateSet( NULL, "latin1" ); +--- 1126,1132 ---- + + gui.event_buffer = (PhEvent_t *) alloc( EVENT_BUFFER_SIZE ); + if( gui.event_buffer == NULL ) +! return FAIL; + + /* Get a translation so we can convert from ISO Latin-1 to UTF */ + charset_translate = PxTranslateSet( NULL, "latin1" ); +*************** +*** 1141,1147 **** + PtSetArg( &args[ n++ ], Pt_ARG_DIM, &window_size, 0 ); + gui.vimWindow = PtCreateWidget( PtWindow, NULL, n, args ); + if( gui.vimWindow == NULL ) +! return( FAIL ); + + PtAddCallback( gui.vimWindow, Pt_CB_WINDOW, gui_ph_handle_window_cb, NULL ); + PtAddCallback( gui.vimWindow, Pt_CB_WINDOW_OPENING, +--- 1141,1147 ---- + PtSetArg( &args[ n++ ], Pt_ARG_DIM, &window_size, 0 ); + gui.vimWindow = PtCreateWidget( PtWindow, NULL, n, args ); + if( gui.vimWindow == NULL ) +! return FAIL; + + PtAddCallback( gui.vimWindow, Pt_CB_WINDOW, gui_ph_handle_window_cb, NULL ); + PtAddCallback( gui.vimWindow, Pt_CB_WINDOW_OPENING, +*************** +*** 1158,1164 **** + + gui.vimPanelGroup = PtCreateWidget( PtPanelGroup, gui.vimWindow, n, args ); + if( gui.vimPanelGroup == NULL ) +! return( FAIL ); + + PtAddCallback( gui.vimPanelGroup, Pt_CB_PG_PANEL_SWITCHING, + gui_ph_handle_pg_change, NULL ); +--- 1158,1164 ---- + + gui.vimPanelGroup = PtCreateWidget( PtPanelGroup, gui.vimWindow, n, args ); + if( gui.vimPanelGroup == NULL ) +! return FAIL; + + PtAddCallback( gui.vimPanelGroup, Pt_CB_PG_PANEL_SWITCHING, + gui_ph_handle_pg_change, NULL ); +*************** +*** 1172,1178 **** + + gui.vimContainer = PtCreateWidget( PtPane, gui.vimWindow, n, args ); + if( gui.vimContainer == NULL ) +! return( FAIL ); + + PtAddCallback( gui.vimContainer, Pt_CB_RESIZE, gui_ph_pane_resize, NULL ); + #endif +--- 1172,1178 ---- + + gui.vimContainer = PtCreateWidget( PtPane, gui.vimWindow, n, args ); + if( gui.vimContainer == NULL ) +! return FAIL; + + PtAddCallback( gui.vimContainer, Pt_CB_RESIZE, gui_ph_pane_resize, NULL ); + #endif +*************** +*** 1195,1201 **** + + gui.vimTextArea = PtCreateWidget( PtRaw, Pt_DFLT_PARENT, n, args ); + if( gui.vimTextArea == NULL) +! return( FAIL ); + + /* TODO: use PtAddEventHandlers instead? */ + /* Not using Ph_EV_BUT_REPEAT because vim wouldn't use it anyway */ +--- 1195,1201 ---- + + gui.vimTextArea = PtCreateWidget( PtRaw, Pt_DFLT_PARENT, n, args ); + if( gui.vimTextArea == NULL) +! return FAIL; + + /* TODO: use PtAddEventHandlers instead? */ + /* Not using Ph_EV_BUT_REPEAT because vim wouldn't use it anyway */ +*************** +*** 1220,1230 **** + */ + gui_ph_timer_cursor = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL ); + if( gui_ph_timer_cursor == NULL ) +! return( FAIL ); + + gui_ph_timer_timeout = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL ); + if( gui_ph_timer_timeout == NULL ) +! return( FAIL ); + + PtAddCallback( gui_ph_timer_cursor, Pt_CB_TIMER_ACTIVATE, + gui_ph_handle_timer_cursor, NULL); +--- 1220,1230 ---- + */ + gui_ph_timer_cursor = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL ); + if( gui_ph_timer_cursor == NULL ) +! return FAIL; + + gui_ph_timer_timeout = PtCreateWidget( PtTimer, gui.vimWindow, 0, NULL ); + if( gui_ph_timer_timeout == NULL ) +! return FAIL; + + PtAddCallback( gui_ph_timer_cursor, Pt_CB_TIMER_ACTIVATE, + gui_ph_handle_timer_cursor, NULL); +*************** +*** 1239,1245 **** + gui.vimToolBarGroup = PtCreateWidget( PtToolbarGroup, gui.vimWindow, + n, args ); + if( gui.vimToolBarGroup == NULL ) +! return( FAIL ); + + PtAddCallback( gui.vimToolBarGroup, Pt_CB_RESIZE, + gui_ph_handle_menu_resize, NULL ); +--- 1239,1245 ---- + gui.vimToolBarGroup = PtCreateWidget( PtToolbarGroup, gui.vimWindow, + n, args ); + if( gui.vimToolBarGroup == NULL ) +! return FAIL; + + PtAddCallback( gui.vimToolBarGroup, Pt_CB_RESIZE, + gui_ph_handle_menu_resize, NULL ); +*************** +*** 1254,1260 **** + } + gui.vimMenuBar = PtCreateWidget( PtMenuBar, gui.vimToolBarGroup, n, args ); + if( gui.vimMenuBar == NULL ) +! return( FAIL ); + + # ifdef FEAT_TOOLBAR + n = 0; +--- 1254,1260 ---- + } + gui.vimMenuBar = PtCreateWidget( PtMenuBar, gui.vimToolBarGroup, n, args ); + if( gui.vimMenuBar == NULL ) +! return FAIL; + + # ifdef FEAT_TOOLBAR + n = 0; +*************** +*** 1273,1279 **** + + gui.vimToolBar = PtCreateWidget( PtToolbar, gui.vimToolBarGroup, n, args ); + if( gui.vimToolBar == NULL ) +! return( FAIL ); + + /* + * Size for the toolbar is fetched in gui_mch_show_toolbar, after +--- 1273,1279 ---- + + gui.vimToolBar = PtCreateWidget( PtToolbar, gui.vimToolBarGroup, n, args ); + if( gui.vimToolBar == NULL ) +! return FAIL; + + /* + * Size for the toolbar is fetched in gui_mch_show_toolbar, after +*************** +*** 1284,1296 **** + + #endif + +! return( OK ); + } + + int + gui_mch_init_check(void) + { +! return( (is_photon_available == TRUE) ? OK : FAIL ); + } + + int +--- 1284,1296 ---- + + #endif + +! return OK; + } + + int + gui_mch_init_check(void) + { +! return (is_photon_available == TRUE) ? OK : FAIL; + } + + int +*************** +*** 1310,1316 **** + if (gui_win_x != -1 && gui_win_y != -1) + gui_mch_set_winpos(gui_win_x, gui_win_y); + +! return( (PtRealizeWidget( gui.vimWindow ) == 0) ? OK : FAIL ); + } + + void +--- 1310,1316 ---- + if (gui_win_x != -1 && gui_win_y != -1) + gui_mch_set_winpos(gui_win_x, gui_win_y); + +! return (PtRealizeWidget( gui.vimWindow ) == 0) ? OK : FAIL; + } + + void +*************** +*** 1336,1342 **** + exit_gui_mch_update( void *data ) + { + *(int *)data = FALSE; +! return( Pt_END ); + } + + void +--- 1336,1342 ---- + exit_gui_mch_update( void *data ) + { + *(int *)data = FALSE; +! return Pt_END; + } + + void +*************** +*** 1365,1374 **** + if( input_available() ) + { + PtSetResource( gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL, 0, 0 ); +! return( OK ); + } + else if( is_timeout == TRUE ) +! return( FAIL ); + } + } + +--- 1365,1374 ---- + if( input_available() ) + { + PtSetResource( gui_ph_timer_timeout, Pt_ARG_TIMER_INITIAL, 0, 0 ); +! return OK; + } + else if( is_timeout == TRUE ) +! return FAIL; + } + } + +*************** +*** 1446,1454 **** + vim_free( default_path ); + + if( file.ret == Pt_FSDIALOG_BTN1 ) +! return( vim_strsave( file.path ) ); + } +! return( NULL ); + } + #endif + +--- 1446,1454 ---- + vim_free( default_path ); + + if( file.ret == Pt_FSDIALOG_BTN1 ) +! return vim_strsave(file.path); + } +! return NULL; + } + #endif + +*************** +*** 1470,1476 **** + + PtModalUnblock( modal_ctrl, (void *) button ); + +! return( Pt_TRUE ); + } + + static int +--- 1470,1476 ---- + + PtModalUnblock( modal_ctrl, (void *) button ); + +! return Pt_TRUE; + } + + static int +*************** +*** 1478,1484 **** + { + if( info->reason_subtype == Pt_EDIT_ACTIVATE ) + gui_ph_dialog_close( 1, data ); +! return( Pt_CONTINUE ); + } + + static int +--- 1478,1484 ---- + { + if( info->reason_subtype == Pt_EDIT_ACTIVATE ) + gui_ph_dialog_close( 1, data ); +! return Pt_CONTINUE; + } + + static int +*************** +*** 1490,1498 **** + if( ( key->key_flags & Pk_KF_Cap_Valid ) && ( key->key_cap == Pk_Escape ) ) + { + gui_ph_dialog_close( 0, data ); +! return( Pt_CONSUME ); + } +! return( Pt_PROCESS ); + } + + int +--- 1490,1498 ---- + if( ( key->key_flags & Pk_KF_Cap_Valid ) && ( key->key_cap == Pk_Escape ) ) + { + gui_ph_dialog_close( 0, data ); +! return Pt_CONSUME; + } +! return Pt_PROCESS; + } + + int +*************** +*** 1519,1525 **** + button_count = len = i = 0; + + if( buttons == NULL || *buttons == NUL ) +! return( -1 ); + + /* There is one less separator than buttons, so bump up the button count */ + button_count = 1; +--- 1519,1525 ---- + button_count = len = i = 0; + + if( buttons == NULL || *buttons == NUL ) +! return -1; + + /* There is one less separator than buttons, so bump up the button count */ + button_count = 1; +*************** +*** 1637,1643 **** + vim_free( button_array ); + vim_free( buttons_copy ); + +! return( dialog_result ); + } + #endif + /****************************************************************************/ +--- 1637,1643 ---- + vim_free( button_array ); + vim_free( buttons_copy ); + +! return dialog_result; + } + #endif + /****************************************************************************/ +*************** +*** 1653,1659 **** + *x = pos->x; + *y = pos->y; + +! return( OK ); + } + + void +--- 1653,1659 ---- + *x = pos->x; + *y = pos->y; + +! return OK; + } + + void +*************** +*** 1975,1985 **** + hex_digit(int c) + { + if (VIM_ISDIGIT(c)) +! return( c - '0' ); + c = TOLOWER_ASC(c); + if (c >= 'a' && c <= 'f') +! return( c - 'a' + 10 ); +! return( -1000 ); + } + + +--- 1975,1985 ---- + hex_digit(int c) + { + if (VIM_ISDIGIT(c)) +! return c - '0'; + c = TOLOWER_ASC(c); + if (c >= 'a' && c <= 'f') +! return c - 'a' + 10; +! return -1000; + } + + +*************** +*** 2065,2077 **** + b = hex_digit( name[5] ) * 16 + hex_digit( name[6] ); + if( r < 0 || g < 0 || b < 0 ) + return INVALCOLOR; +! return( RGB( r, g, b ) ); + } + + for( i = 0; i < ARRAY_LENGTH( table ); i++ ) + { + if( STRICMP( name, table[i].name ) == 0 ) +! return( table[i].colour ); + } + + /* +--- 2065,2077 ---- + b = hex_digit( name[5] ) * 16 + hex_digit( name[6] ); + if( r < 0 || g < 0 || b < 0 ) + return INVALCOLOR; +! return RGB(r, g, b); + } + + for( i = 0; i < ARRAY_LENGTH( table ); i++ ) + { + if( STRICMP( name, table[i].name ) == 0 ) +! return table[i].colour; + } + + /* +*************** +*** 2115,2121 **** + if (STRICMP(color, name) == 0) + { + fclose(fd); +! return( (guicolor_T) RGB(r,g,b) ); + } + } + +--- 2115,2121 ---- + if (STRICMP(color, name) == 0) + { + fclose(fd); +! return (guicolor_T)RGB(r, g, b); + } + } + +*************** +*** 2451,2458 **** + for (i = 0; special_keys[i].key_sym != 0; i++) + if (name[0] == special_keys[i].vim_code0 && + name[1] == special_keys[i].vim_code1) +! return( OK ); +! return( FAIL ); + } + + /****************************************************************************/ +--- 2451,2458 ---- + for (i = 0; special_keys[i].key_sym != 0; i++) + if (name[0] == special_keys[i].vim_code0 && + name[1] == special_keys[i].vim_code1) +! return OK; +! return FAIL; + } + + /****************************************************************************/ +*************** +*** 2512,2518 **** + + temp_phi = &external_icon; + } +! return( temp_phi ); + } + + /* +--- 2512,2518 ---- + + temp_phi = &external_icon; + } +! return temp_phi; + } + + /* +*************** +*** 2541,2556 **** + icon = gui_ph_toolbar_load_icon( full_pathname ); + + if( icon != NULL ) +! return( icon ); + } + + if( menu->iconidx >= 0 && + ( menu->iconidx < ARRAY_LENGTH( gui_ph_toolbar_images ) ) ) + { +! return( gui_ph_toolbar_images[ menu->iconidx ] ); + } + +! return( NULL ); + } + #endif + +--- 2541,2556 ---- + icon = gui_ph_toolbar_load_icon( full_pathname ); + + if( icon != NULL ) +! return icon; + } + + if( menu->iconidx >= 0 && + ( menu->iconidx < ARRAY_LENGTH( gui_ph_toolbar_images ) ) ) + { +! return gui_ph_toolbar_images[menu->iconidx]; + } + +! return NULL; + } + #endif + +*************** +*** 2895,2905 **** + * at least has the bits we're checking for */ + if( font_size == info.size && + style == (info.style & style) ) +! return( (GuiFont) font_tag ); + } + vim_free( font_tag ); + } +! return( NULL ); + } + + /* +--- 2895,2905 ---- + * at least has the bits we're checking for */ + if( font_size == info.size && + style == (info.style & style) ) +! return (GuiFont)font_tag; + } + vim_free( font_tag ); + } +! return NULL; + } + + /* +*************** +*** 2957,2965 **** + } + } + } +! return( TRUE ); + } +! return( FALSE ); + } + + int +--- 2957,2965 ---- + } + } + } +! return TRUE; + } +! return FALSE; + } + + int +*************** +*** 2985,2991 **** + "pcterm12", -1, PHFONT_FIXED, NULL ); + + if( font_tag == NULL ) +! return( FAIL ); + + gui_mch_free_font( gui.norm_font ); + gui.norm_font = font_tag; +--- 2985,2991 ---- + "pcterm12", -1, PHFONT_FIXED, NULL ); + + if( font_tag == NULL ) +! return FAIL; + + gui_mch_free_font( gui.norm_font ); + gui.norm_font = font_tag; +*************** +*** 2997,3009 **** + { + if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, + &font_size ) == FALSE ) +! return( FAIL ); + + font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 ); + if( font_tag == NULL ) + { + vim_free( font_name ); +! return( FAIL ); + } + + gui_mch_free_font( gui.norm_font ); +--- 2997,3009 ---- + { + if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, + &font_size ) == FALSE ) +! return FAIL; + + font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 ); + if( font_tag == NULL ) + { + vim_free( font_name ); +! return FAIL; + } + + gui_mch_free_font( gui.norm_font ); +*************** +*** 3026,3032 **** + gui.char_ascent = - extent.ul.y; + + vim_free( font_name ); +! return( OK ); + } + + /* +--- 3026,3032 ---- + gui.char_ascent = - extent.ul.y; + + vim_free( font_name ); +! return OK; + } + + /* +*************** +*** 3042,3048 **** + gui.char_height = - info.ascender + info.descender + p_linespace; + gui.char_ascent = - info.ascender + p_linespace / 2; + +! return( OK ); + } + + GuiFont +--- 3042,3048 ---- + gui.char_height = - info.ascender + info.descender + p_linespace; + gui.char_ascent = - info.ascender + p_linespace / 2; + +! return OK; + } + + GuiFont +*************** +*** 3060,3072 **** + vim_free( font_name ); + + if( font_tag != NULL ) +! return( (GuiFont) font_tag ); + } + + if( report_error ) + EMSG2(e_font, vim_font_name ); + +! return( FAIL ); + } + + #if defined(FEAT_EVAL) || defined(PROTO) +--- 3060,3072 ---- + vim_free( font_name ); + + if( font_tag != NULL ) +! return (GuiFont)font_tag; + } + + if( report_error ) + EMSG2(e_font, vim_font_name ); + +! return FAIL; + } + + #if defined(FEAT_EVAL) || defined(PROTO) +*** ../vim-7.3.261/src/version.c 2011-07-27 13:59:12.000000000 +0200 +--- src/version.c 2011-07-27 14:08:08.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 262, + /**/ + +-- +You know you use Vim too much when you have this alias in your +~/.bashrc file: alias :e=/bin/vim (Eljay Love-Jensen) + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.263 b/source/ap/vim/patches/7.3.263 new file mode 100644 index 000000000..98850988c --- /dev/null +++ b/source/ap/vim/patches/7.3.263 @@ -0,0 +1,162 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.263 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.263 +Problem: Perl and Tcl have a few code style problems. +Solution: Clean it up. (Elias Diem) +Files: src/if_perl.xs, src/if_tcl.c + + +*** ../vim-7.3.262/src/if_perl.xs 2010-10-23 14:02:48.000000000 +0200 +--- src/if_perl.xs 2011-07-27 14:11:03.000000000 +0200 +*************** +*** 755,761 **** + #ifdef HAVE_SANDBOX + if (sandbox) + { +! safe = perl_get_sv( "VIM::safe", FALSE ); + # ifndef MAKE_TEST /* avoid a warning for unreachable code */ + if (safe == NULL || !SvTRUE(safe)) + EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); +--- 755,761 ---- + #ifdef HAVE_SANDBOX + if (sandbox) + { +! safe = perl_get_sv("VIM::safe", FALSE); + # ifndef MAKE_TEST /* avoid a warning for unreachable code */ + if (safe == NULL || !SvTRUE(safe)) + EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); +*************** +*** 1108,1114 **** + VIWIN win + + PPCODE: +! if(items == 1) + { + EXTEND(sp, 2); + if (!win_valid(win)) +--- 1108,1114 ---- + VIWIN win + + PPCODE: +! if (items == 1) + { + EXTEND(sp, 2); + if (!win_valid(win)) +*************** +*** 1116,1122 **** + PUSHs(sv_2mortal(newSViv(win->w_cursor.lnum))); + PUSHs(sv_2mortal(newSViv(win->w_cursor.col))); + } +! else if(items == 3) + { + int lnum, col; + +--- 1116,1122 ---- + PUSHs(sv_2mortal(newSViv(win->w_cursor.lnum))); + PUSHs(sv_2mortal(newSViv(win->w_cursor.col))); + } +! else if (items == 3) + { + int lnum, col; + +*************** +*** 1249,1257 **** + { + lnum = SvIV(ST(1)); + count = 1 + SvIV(ST(2)) - lnum; +! if(count == 0) + count = 1; +! if(count < 0) + { + lnum -= count; + count = -count; +--- 1249,1257 ---- + { + lnum = SvIV(ST(1)); + count = 1 + SvIV(ST(2)) - lnum; +! if (count == 0) + count = 1; +! if (count < 0) + { + lnum -= count; + count = -count; +*** ../vim-7.3.262/src/if_tcl.c 2010-12-17 20:23:56.000000000 +0100 +--- src/if_tcl.c 2011-07-27 14:11:03.000000000 +0200 +*************** +*** 1884,1897 **** + { + int newerr = OK; + +! if (error == TCL_EXIT ) + { + int retval; + char buf[50]; + Tcl_Obj *robj; + + robj = Tcl_GetObjResult(tclinfo.interp); +! if( Tcl_GetIntFromObj(tclinfo.interp, robj, &retval) != TCL_OK ) + { + EMSG(_("E281: TCL ERROR: exit code is not int!? Please report this to vim-dev@vim.org")); + newerr = FAIL; +--- 1884,1897 ---- + { + int newerr = OK; + +! if (error == TCL_EXIT) + { + int retval; + char buf[50]; + Tcl_Obj *robj; + + robj = Tcl_GetObjResult(tclinfo.interp); +! if (Tcl_GetIntFromObj(tclinfo.interp, robj, &retval) != TCL_OK) + { + EMSG(_("E281: TCL ERROR: exit code is not int!? Please report this to vim-dev@vim.org")); + newerr = FAIL; +*************** +*** 1900,1906 **** + { + sprintf(buf, _("E572: exit code %d"), retval); + tclerrmsg(buf); +! if (retval == 0 ) + { + did_emsg = 0; + newerr = OK; +--- 1900,1906 ---- + { + sprintf(buf, _("E572: exit code %d"), retval); + tclerrmsg(buf); +! if (retval == 0) + { + did_emsg = 0; + newerr = OK; +*** ../vim-7.3.262/src/version.c 2011-07-27 14:09:05.000000000 +0200 +--- src/version.c 2011-07-27 14:12:05.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 263, + /**/ + +-- +DEAD PERSON: I don't want to go in the cart! +CUSTOMER: Oh, don't be such a baby. +MORTICIAN: I can't take him... +DEAD PERSON: I feel fine! +CUSTOMER: Oh, do us a favor... +MORTICIAN: I can't. + The Quest for the Holy Grail (Monty Python) + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.264 b/source/ap/vim/patches/7.3.264 new file mode 100644 index 000000000..71ec851f3 --- /dev/null +++ b/source/ap/vim/patches/7.3.264 @@ -0,0 +1,159 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.264 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.264 +Problem: When the current directory name contains wildcard characters, such + as "foo[with]bar", the tags file can't be found. (Jeremy + Erickson) +Solution: When searching for matching files also match without expanding + wildcards. This is a bit of a hack. +Files: src/vim.h, src/misc1.c, src/misc2.c + + +*** ../vim-7.3.263/src/vim.h 2011-07-20 15:04:52.000000000 +0200 +--- src/vim.h 2011-07-27 16:21:38.000000000 +0200 +*************** +*** 816,821 **** +--- 816,822 ---- + #define EW_PATH 0x80 /* search in 'path' too */ + #define EW_ICASE 0x100 /* ignore case */ + #define EW_NOERROR 0x200 /* no error for bad regexp */ ++ #define EW_NOTWILD 0x400 /* add match with literal name if exists */ + /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND + * is used when executing commands and EW_SILENT for interactive expanding. */ + +*** ../vim-7.3.263/src/misc1.c 2011-07-20 15:04:52.000000000 +0200 +--- src/misc1.c 2011-07-27 17:24:39.000000000 +0200 +*************** +*** 9119,9125 **** + * all entries found with "matchname". */ + if ((p[0] != '.' || starts_with_dot) + && (matchname == NULL +! || vim_regexec(®match, p, (colnr_T)0))) + { + #ifdef WIN3264 + STRCPY(s, p); +--- 9119,9127 ---- + * all entries found with "matchname". */ + if ((p[0] != '.' || starts_with_dot) + && (matchname == NULL +! || vim_regexec(®match, p, (colnr_T)0) +! || ((flags & EW_NOTWILD) +! && fnamencmp(path + (s - buf), p, e - s) == 0))) + { + #ifdef WIN3264 + STRCPY(s, p); +*************** +*** 9323,9329 **** + e = p; + *e = NUL; + +! /* now we have one wildcard component between "s" and "e" */ + /* Remove backslashes between "wildoff" and the start of the wildcard + * component. */ + for (p = buf + wildoff; p < s; ++p) +--- 9325,9331 ---- + e = p; + *e = NUL; + +! /* Now we have one wildcard component between "s" and "e". */ + /* Remove backslashes between "wildoff" and the start of the wildcard + * component. */ + for (p = buf + wildoff; p < s; ++p) +*************** +*** 9390,9396 **** + if (dp == NULL) + break; + if ((dp->d_name[0] != '.' || starts_with_dot) +! && vim_regexec(®match, (char_u *)dp->d_name, (colnr_T)0)) + { + STRCPY(s, dp->d_name); + len = STRLEN(buf); +--- 9392,9400 ---- + if (dp == NULL) + break; + if ((dp->d_name[0] != '.' || starts_with_dot) +! && (vim_regexec(®match, (char_u *)dp->d_name, (colnr_T)0) +! || ((flags & EW_NOTWILD) +! && fnamencmp(path + (s - buf), dp->d_name, e - s) == 0))) + { + STRCPY(s, dp->d_name); + len = STRLEN(buf); +*** ../vim-7.3.263/src/misc2.c 2011-07-07 17:15:29.000000000 +0200 +--- src/misc2.c 2011-07-27 17:21:10.000000000 +0200 +*************** +*** 4653,4661 **** + { + if (r_ptr[0] == '\\' && r_ptr[1] == ';') + { +! /* overwrite the escape char, +! * use STRLEN(r_ptr) to move the trailing '\0' +! */ + STRMOVE(r_ptr, r_ptr + 1); + r_ptr++; + } +--- 4653,4660 ---- + { + if (r_ptr[0] == '\\' && r_ptr[1] == ';') + { +! /* Overwrite the escape char, +! * use STRLEN(r_ptr) to move the trailing '\0'. */ + STRMOVE(r_ptr, r_ptr + 1); + r_ptr++; + } +*************** +*** 4914,4923 **** + stackp->ffs_filearray_size = 0; + } + else + expand_wildcards((dirptrs[1] == NULL) ? 1 : 2, dirptrs, + &stackp->ffs_filearray_size, + &stackp->ffs_filearray, +! EW_DIR|EW_ADDSLASH|EW_SILENT); + + stackp->ffs_filearray_cur = 0; + stackp->ffs_stage = 0; +--- 4913,4925 ---- + stackp->ffs_filearray_size = 0; + } + else ++ /* Add EW_NOTWILD because the expanded path may contain ++ * wildcard characters that are to be taken literally. ++ * This is a bit of a hack. */ + expand_wildcards((dirptrs[1] == NULL) ? 1 : 2, dirptrs, + &stackp->ffs_filearray_size, + &stackp->ffs_filearray, +! EW_DIR|EW_ADDSLASH|EW_SILENT|EW_NOTWILD); + + stackp->ffs_filearray_cur = 0; + stackp->ffs_stage = 0; +*** ../vim-7.3.263/src/version.c 2011-07-27 14:15:41.000000000 +0200 +--- src/version.c 2011-07-27 17:25:44.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 264, + /**/ + +-- +CUSTOMER: You're not fooling anyone y'know. Look, isn't there something + you can do? +DEAD PERSON: I feel happy... I feel happy. + [whop] +CUSTOMER: Ah, thanks very much. +MORTICIAN: Not at all. See you on Thursday. +CUSTOMER: Right. + The Quest for the Holy Grail (Monty Python) + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.265 b/source/ap/vim/patches/7.3.265 new file mode 100644 index 000000000..98cb1b4e0 --- /dev/null +++ b/source/ap/vim/patches/7.3.265 @@ -0,0 +1,145 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.265 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.265 +Problem: When storing a pattern in search history there is no proper check + for the separator character. +Solution: Pass the separator character to in_history(). (Muraoka Taro) +Files: src/ex_getln.c + + +*** ../vim-7.3.264/src/ex_getln.c 2011-07-07 16:44:33.000000000 +0200 +--- src/ex_getln.c 2011-07-27 17:50:35.000000000 +0200 +*************** +*** 67,73 **** + + static int hist_char2type __ARGS((int c)); + +! static int in_history __ARGS((int, char_u *, int)); + # ifdef FEAT_EVAL + static int calc_hist_idx __ARGS((int histype, int num)); + # endif +--- 67,73 ---- + + static int hist_char2type __ARGS((int c)); + +! static int in_history __ARGS((int, char_u *, int, int)); + # ifdef FEAT_EVAL + static int calc_hist_idx __ARGS((int histype, int num)); + # endif +*************** +*** 5289,5301 **** + * If 'move_to_front' is TRUE, matching entry is moved to end of history. + */ + static int +! in_history(type, str, move_to_front) + int type; + char_u *str; + int move_to_front; /* Move the entry to the front if it exists */ + { + int i; + int last_i = -1; + + if (hisidx[type] < 0) + return FALSE; +--- 5289,5303 ---- + * If 'move_to_front' is TRUE, matching entry is moved to end of history. + */ + static int +! in_history(type, str, move_to_front, sep) + int type; + char_u *str; + int move_to_front; /* Move the entry to the front if it exists */ ++ int sep; + { + int i; + int last_i = -1; ++ char_u *p; + + if (hisidx[type] < 0) + return FALSE; +*************** +*** 5304,5310 **** + { + if (history[type][i].hisstr == NULL) + return FALSE; +! if (STRCMP(str, history[type][i].hisstr) == 0) + { + if (!move_to_front) + return TRUE; +--- 5306,5317 ---- + { + if (history[type][i].hisstr == NULL) + return FALSE; +! +! /* For search history, check that the separator character matches as +! * well. */ +! p = history[type][i].hisstr; +! if (STRCMP(str, p) == 0 +! && (type != HIST_SEARCH || sep == p[STRLEN(p) + 1])) + { + if (!move_to_front) + return TRUE; +*************** +*** 5398,5404 **** + } + last_maptick = -1; + } +! if (!in_history(histype, new_entry, TRUE)) + { + if (++hisidx[histype] == hislen) + hisidx[histype] = 0; +--- 5405,5411 ---- + } + last_maptick = -1; + } +! if (!in_history(histype, new_entry, TRUE, sep)) + { + if (++hisidx[histype] == hislen) + hisidx[histype] = 0; +*************** +*** 5977,5983 **** + if (val != NULL && *val != NUL) + { + if (!in_history(type, val + (type == HIST_SEARCH), +! viminfo_add_at_front)) + { + /* Need to re-allocate to append the separator byte. */ + len = STRLEN(val); +--- 5984,5990 ---- + if (val != NULL && *val != NUL) + { + if (!in_history(type, val + (type == HIST_SEARCH), +! viminfo_add_at_front, *val)) + { + /* Need to re-allocate to append the separator byte. */ + len = STRLEN(val); +*** ../vim-7.3.264/src/version.c 2011-07-27 17:31:42.000000000 +0200 +--- src/version.c 2011-07-27 17:58:22.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 265, + /**/ + +-- + [clop clop] +MORTICIAN: Who's that then? +CUSTOMER: I don't know. +MORTICIAN: Must be a king. +CUSTOMER: Why? +MORTICIAN: He hasn't got shit all over him. + The Quest for the Holy Grail (Monty Python) + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.266 b/source/ap/vim/patches/7.3.266 new file mode 100644 index 000000000..373280ee4 --- /dev/null +++ b/source/ap/vim/patches/7.3.266 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.266 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.266 +Problem: In Gvim with iBus typing space in Insert mode doesn't work. +Solution: Clear xim_expected_char after checking it. +Files: src/mbyte.c + + +*** ../vim-7.3.265/src/mbyte.c 2011-07-15 21:16:54.000000000 +0200 +--- src/mbyte.c 2011-07-27 18:21:13.000000000 +0200 +*************** +*** 5170,5175 **** +--- 5170,5179 ---- + /* We had a keypad key, and XIM tried to thieve it */ + return FALSE; + ++ /* This is supposed to fix a problem with iBus, that space ++ * characters don't work in input mode. */ ++ xim_expected_char = NUL; ++ + /* Normal processing */ + return imresult; + } +*** ../vim-7.3.265/src/version.c 2011-07-27 17:58:42.000000000 +0200 +--- src/version.c 2011-07-27 18:23:00.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 266, + /**/ + +-- + [clop clop] +ARTHUR: Old woman! +DENNIS: Man! +ARTHUR: Man, sorry. What knight lives in that castle over there? +DENNIS: I'm thirty seven. +ARTHUR: What? +DENNIS: I'm thirty seven -- I'm not old! + The Quest for the Holy Grail (Monty Python) + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.267 b/source/ap/vim/patches/7.3.267 new file mode 100644 index 000000000..d986e5036 --- /dev/null +++ b/source/ap/vim/patches/7.3.267 @@ -0,0 +1,67 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.267 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.267 +Problem: Ruby on Mac OS X 10.7 may crash. +Solution: Avoid alloc(0). (Bjorn Winckler) +Files: src/if_ruby.c + + +*** ../vim-7.3.266/src/if_ruby.c 2011-01-17 19:53:20.000000000 +0100 +--- src/if_ruby.c 2011-08-04 18:57:43.000000000 +0200 +*************** +*** 761,771 **** + char *buff, *p; + + str = rb_obj_as_string(str); +! buff = ALLOCA_N(char, RSTRING_LEN(str)); +! strcpy(buff, RSTRING_PTR(str)); +! p = strchr(buff, '\n'); +! if (p) *p = '\0'; +! MSG(buff); + return Qnil; + } + +--- 761,779 ---- + char *buff, *p; + + str = rb_obj_as_string(str); +! if (RSTRING_LEN(str) > 0) +! { +! /* Only do this when the string isn't empty, alloc(0) causes trouble. */ +! buff = ALLOCA_N(char, RSTRING_LEN(str)); +! strcpy(buff, RSTRING_PTR(str)); +! p = strchr(buff, '\n'); +! if (p) *p = '\0'; +! MSG(buff); +! } +! else +! { +! MSG(""); +! } + return Qnil; + } + +*** ../vim-7.3.266/src/version.c 2011-07-27 18:25:40.000000000 +0200 +--- src/version.c 2011-08-04 19:07:45.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 267, + /**/ + +-- +There are 10 kinds of people: Those who understand binary and those who don't. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.268 b/source/ap/vim/patches/7.3.268 new file mode 100644 index 000000000..aa848770c --- /dev/null +++ b/source/ap/vim/patches/7.3.268 @@ -0,0 +1,69 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.268 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.268 +Problem: Vim freezes when executing an external command with zsh. +Solution: Use O_NOCTTY both in the master and slave. (Bjorn Winckler) +Files: src/os_unix.c + + +*** ../vim-7.3.267/src/os_unix.c 2011-07-07 16:20:45.000000000 +0200 +--- src/os_unix.c 2011-08-04 19:06:14.000000000 +0200 +*************** +*** 3889,3899 **** + if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE))) + { + pty_master_fd = OpenPTY(&tty_name); /* open pty */ +! if (pty_master_fd >= 0 && ((pty_slave_fd = +! open(tty_name, O_RDWR | O_EXTRA, 0)) < 0)) + { +! close(pty_master_fd); +! pty_master_fd = -1; + } + } + /* +--- 3889,3909 ---- + if (p_guipty && !(options & (SHELL_READ|SHELL_WRITE))) + { + pty_master_fd = OpenPTY(&tty_name); /* open pty */ +! if (pty_master_fd >= 0) + { +! /* Leaving out O_NOCTTY may lead to waitpid() always returning +! * 0 on Mac OS X 10.7 thereby causing freezes. Let's assume +! * adding O_NOCTTY always works when defined. */ +! #ifdef O_NOCTTY +! pty_slave_fd = open(tty_name, O_RDWR | O_NOCTTY | O_EXTRA, 0); +! #else +! pty_slave_fd = open(tty_name, O_RDWR | O_EXTRA, 0); +! #endif +! if (pty_slave_fd < 0) +! { +! close(pty_master_fd); +! pty_master_fd = -1; +! } + } + } + /* +*** ../vim-7.3.267/src/version.c 2011-08-04 19:34:55.000000000 +0200 +--- src/version.c 2011-08-04 19:36:00.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 268, + /**/ + +-- +Mental Floss prevents moral decay! + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.269 b/source/ap/vim/patches/7.3.269 new file mode 100644 index 000000000..a0bfc473c --- /dev/null +++ b/source/ap/vim/patches/7.3.269 @@ -0,0 +1,112 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.269 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.269 +Problem: 'shellcmdflag' only works with one flag. +Solution: Split into multiple arguments. (Gary Johnson) +Files: src/os_unix.c + + +*** ../vim-7.3.268/src/os_unix.c 2011-08-04 19:36:47.000000000 +0200 +--- src/os_unix.c 2011-08-04 20:27:13.000000000 +0200 +*************** +*** 3795,3802 **** +--- 3795,3804 ---- + int retval = -1; + char **argv = NULL; + int argc; ++ char_u *p_shcf_copy = NULL; + int i; + char_u *p; ++ char_u *s; + int inquote; + int pty_master_fd = -1; /* for pty's */ + # ifdef FEAT_GUI +*************** +*** 3855,3860 **** +--- 3857,3875 ---- + } + if (argv == NULL) + { ++ /* ++ * Account for possible multiple args in p_shcf. ++ */ ++ p = p_shcf; ++ for (;;) ++ { ++ p = skiptowhite(p); ++ if (*p == NUL) ++ break; ++ ++argc; ++ p = skipwhite(p); ++ } ++ + argv = (char **)alloc((unsigned)((argc + 4) * sizeof(char *))); + if (argv == NULL) /* out of memory */ + goto error; +*************** +*** 3864,3870 **** + { + if (extra_shell_arg != NULL) + argv[argc++] = (char *)extra_shell_arg; +! argv[argc++] = (char *)p_shcf; + argv[argc++] = (char *)cmd; + } + argv[argc] = NULL; +--- 3879,3901 ---- + { + if (extra_shell_arg != NULL) + argv[argc++] = (char *)extra_shell_arg; +! +! /* Break 'shellcmdflag' into white separated parts. This doesn't +! * handle quoted strings, they are very unlikely to appear. */ +! p_shcf_copy = alloc((unsigned)STRLEN(p_shcf) + 1); +! if (p_shcf_copy == NULL) /* out of memory */ +! goto error; +! s = p_shcf_copy; +! p = p_shcf; +! while (*p != NUL) +! { +! argv[argc++] = (char *)s; +! while (*p && *p != ' ' && *p != TAB) +! *s++ = *p++; +! *s++ = NUL; +! p = skipwhite(p); +! } +! + argv[argc++] = (char *)cmd; + } + argv[argc] = NULL; +*************** +*** 4677,4682 **** +--- 4708,4714 ---- + } + } + vim_free(argv); ++ vim_free(p_shcf_copy); + + error: + if (!did_settmode) +*** ../vim-7.3.268/src/version.c 2011-08-04 19:36:47.000000000 +0200 +--- src/version.c 2011-08-04 20:30:44.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 269, + /**/ + +-- +Be nice to your kids... they'll be the ones choosing your nursing home. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.270 b/source/ap/vim/patches/7.3.270 new file mode 100644 index 000000000..3eaf6bfa0 --- /dev/null +++ b/source/ap/vim/patches/7.3.270 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.270 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.270 +Problem: Illegal memory access. +Solution: Swap conditions. (Dominique Pelle) +Files: src/ops.c + + +*** ../vim-7.3.269/src/ops.c 2011-07-15 17:51:30.000000000 +0200 +--- src/ops.c 2011-08-10 12:07:22.000000000 +0200 +*************** +*** 6311,6317 **** + *wc += words; + + /* Add eol_size if the end of line was reached before hitting limit. */ +! if (line[i] == NUL && i < limit) + { + i += eol_size; + chars += eol_size; +--- 6311,6317 ---- + *wc += words; + + /* Add eol_size if the end of line was reached before hitting limit. */ +! if (i < limit && line[i] == NUL) + { + i += eol_size; + chars += eol_size; +*** ../vim-7.3.269/src/version.c 2011-08-04 20:31:50.000000000 +0200 +--- src/version.c 2011-08-10 12:09:30.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 270, + /**/ + +-- +An indication you must be a manager: +You give constructive feedback to your dog. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.271 b/source/ap/vim/patches/7.3.271 new file mode 100644 index 000000000..c42d19a82 --- /dev/null +++ b/source/ap/vim/patches/7.3.271 @@ -0,0 +1,504 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.271 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.271 +Problem: Code not following Vim coding style. +Solution: Fix the style. (Elias Diem) +Files: src/gui_photon.c + + +*** ../vim-7.3.270/src/gui_photon.c 2011-07-27 14:09:05.000000000 +0200 +--- src/gui_photon.c 2011-08-10 12:18:35.000000000 +0200 +*************** +*** 358,378 **** + } + + static int +! gui_ph_handle_window_cb( PtWidget_t *widget, void *data, PtCallbackInfo_t *info ) + { + PhWindowEvent_t *we = info->cbdata; + ushort_t *width, *height; + +! switch( we->event_f ) { + case Ph_WM_CLOSE: + gui_shell_closed(); + break; + + case Ph_WM_FOCUS: + /* Just in case it's hidden and needs to be shown */ +! gui_mch_mousehide( MOUSE_SHOW ); + +! if( we->event_state == Ph_WM_EVSTATE_FOCUS ) + { + gui_focus_change(TRUE); + gui_mch_start_blink(); +--- 358,378 ---- + } + + static int +! gui_ph_handle_window_cb(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) + { + PhWindowEvent_t *we = info->cbdata; + ushort_t *width, *height; + +! switch (we->event_f) { + case Ph_WM_CLOSE: + gui_shell_closed(); + break; + + case Ph_WM_FOCUS: + /* Just in case it's hidden and needs to be shown */ +! gui_mch_mousehide(MOUSE_SHOW); + +! if (we->event_state == Ph_WM_EVSTATE_FOCUS) + { + gui_focus_change(TRUE); + gui_mch_start_blink(); +*************** +*** 385,401 **** + break; + + case Ph_WM_RESIZE: +! PtGetResource( gui.vimWindow, Pt_ARG_WIDTH, &width, 0 ); +! PtGetResource( gui.vimWindow, Pt_ARG_HEIGHT, &height, 0 ); + #ifdef USE_PANEL_GROUP + width -= (pg_margin_left + pg_margin_right); + height -= (pg_margin_top + pg_margin_bottom); + #endif +! gui_resize_shell( *width, *height ); +! gui_set_shellsize( FALSE, FALSE, RESIZE_BOTH ); + is_ignore_draw = FALSE; +! PtEndFlux( gui.vimContainer ); +! PtContainerRelease( gui.vimContainer ); + break; + + default: +--- 385,401 ---- + break; + + case Ph_WM_RESIZE: +! PtGetResource(gui.vimWindow, Pt_ARG_WIDTH, &width, 0); +! PtGetResource(gui.vimWindow, Pt_ARG_HEIGHT, &height, 0); + #ifdef USE_PANEL_GROUP + width -= (pg_margin_left + pg_margin_right); + height -= (pg_margin_top + pg_margin_bottom); + #endif +! gui_resize_shell(*width, *height); +! gui_set_shellsize(FALSE, FALSE, RESIZE_BOTH); + is_ignore_draw = FALSE; +! PtEndFlux(gui.vimContainer); +! PtContainerRelease(gui.vimContainer); + break; + + default: +*************** +*** 406,412 **** + } + + static int +! gui_ph_handle_scrollbar( PtWidget_t *widget, void *data, PtCallbackInfo_t *info ) + { + PtScrollbarCallback_t *scroll; + scrollbar_T *sb; +--- 406,412 ---- + } + + static int +! gui_ph_handle_scrollbar(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) + { + PtScrollbarCallback_t *scroll; + scrollbar_T *sb; +*************** +*** 415,424 **** + scroll = info->cbdata; + + sb = (scrollbar_T *) data; +! if( sb != NULL ) + { + value = scroll->position; +! switch( scroll->action ) + { + case Pt_SCROLL_DRAGGED: + dragging = TRUE; +--- 415,424 ---- + scroll = info->cbdata; + + sb = (scrollbar_T *) data; +! if (sb != NULL) + { + value = scroll->position; +! switch (scroll->action) + { + case Pt_SCROLL_DRAGGED: + dragging = TRUE; +*************** +*** 436,532 **** + } + + static int +! gui_ph_handle_keyboard( PtWidget_t *widget, void *data, PtCallbackInfo_t *info ) + { + PhKeyEvent_t *key; + unsigned char string[6]; + int len, i; + int ch, modifiers; + +! key = PhGetData( info->event ); + + ch = modifiers = len = 0; + +! if( p_mh ) +! gui_mch_mousehide( MOUSE_HIDE ); + + /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */ +! if( key->key_flags & Pk_KF_Compose ) + { + return Pt_CONTINUE; + } + +! if( (key->key_flags & Pk_KF_Cap_Valid) && +! PkIsKeyDown( key->key_flags ) ) + { + #ifdef FEAT_MENU + /* + * Only show the menu if the Alt key is down, and the Shift & Ctrl + * keys aren't down, as well as the other conditions + */ +! if( ( ( key->key_mods & Pk_KM_Alt ) && +! !( key->key_mods & Pk_KM_Shift ) && +! !( key->key_mods & Pk_KM_Ctrl ) ) && + gui.menu_is_active && +! ( *p_wak == 'y' || +! ( *p_wak == 'm' && +! gui_is_menu_shortcut( key->key_cap ) ) ) ) + { + /* Fallthrough and let photon look for the hotkey */ + return Pt_CONTINUE; + } + #endif + +! for( i = 0; special_keys[i].key_sym != 0; i++ ) + { +! if( special_keys[i].key_sym == key->key_cap ) + { + len = 0; +! if( special_keys[i].vim_code1 == NUL ) + ch = special_keys[i].vim_code0; + else + { + /* Detect if a keypad number key has been pressed + * and change the key if Num Lock is on */ +! if( key->key_cap >= Pk_KP_Enter && key->key_cap <= Pk_KP_9 +! && ( key->key_mods & Pk_KM_Num_Lock ) ) + { + /* FIXME: For now, just map the key to a ascii value + * (see ) */ + ch = key->key_cap - 0xf080; + } + else +! ch = TO_SPECIAL( special_keys[i].vim_code0, +! special_keys[i].vim_code1 ); + } + break; + } + } + +! if( key->key_mods & Pk_KM_Ctrl ) + modifiers |= MOD_MASK_CTRL; +! if( key->key_mods & Pk_KM_Alt ) + modifiers |= MOD_MASK_ALT; +! if( key->key_mods & Pk_KM_Shift ) + modifiers |= MOD_MASK_SHIFT; + + /* Is this not a special key? */ +! if( special_keys[i].key_sym == 0 ) + { +! ch = PhTo8859_1( key ); +! if( ch == -1 + #ifdef FEAT_MBYTE +! || ( enc_utf8 && ch > 127 ) + #endif + ) + { + #ifdef FEAT_MBYTE +! len = PhKeyToMb( string, key ); +! if( len > 0 ) + { + static char buf[6]; + int src_taken, dst_made; +! if( enc_utf8 != TRUE ) + { + PxTranslateFromUTF( + charset_translate, +--- 436,532 ---- + } + + static int +! gui_ph_handle_keyboard(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) + { + PhKeyEvent_t *key; + unsigned char string[6]; + int len, i; + int ch, modifiers; + +! key = PhGetData(info->event); + + ch = modifiers = len = 0; + +! if (p_mh) +! gui_mch_mousehide(MOUSE_HIDE); + + /* We're a good lil photon program, aren't we? yes we are, yeess wee arrr */ +! if (key->key_flags & Pk_KF_Compose) + { + return Pt_CONTINUE; + } + +! if ((key->key_flags & Pk_KF_Cap_Valid) && +! PkIsKeyDown(key->key_flags)) + { + #ifdef FEAT_MENU + /* + * Only show the menu if the Alt key is down, and the Shift & Ctrl + * keys aren't down, as well as the other conditions + */ +! if (((key->key_mods & Pk_KM_Alt) && +! !(key->key_mods & Pk_KM_Shift) && +! !(key->key_mods & Pk_KM_Ctrl)) && + gui.menu_is_active && +! (*p_wak == 'y' || +! (*p_wak == 'm' && +! gui_is_menu_shortcut(key->key_cap)))) + { + /* Fallthrough and let photon look for the hotkey */ + return Pt_CONTINUE; + } + #endif + +! for(i = 0; special_keys[i].key_sym != 0; i++) + { +! if (special_keys[i].key_sym == key->key_cap) + { + len = 0; +! if (special_keys[i].vim_code1 == NUL) + ch = special_keys[i].vim_code0; + else + { + /* Detect if a keypad number key has been pressed + * and change the key if Num Lock is on */ +! if (key->key_cap >= Pk_KP_Enter && key->key_cap <= Pk_KP_9 +! && (key->key_mods & Pk_KM_Num_Lock)) + { + /* FIXME: For now, just map the key to a ascii value + * (see ) */ + ch = key->key_cap - 0xf080; + } + else +! ch = TO_SPECIAL(special_keys[i].vim_code0, +! special_keys[i].vim_code1); + } + break; + } + } + +! if (key->key_mods & Pk_KM_Ctrl) + modifiers |= MOD_MASK_CTRL; +! if (key->key_mods & Pk_KM_Alt) + modifiers |= MOD_MASK_ALT; +! if (key->key_mods & Pk_KM_Shift) + modifiers |= MOD_MASK_SHIFT; + + /* Is this not a special key? */ +! if (special_keys[i].key_sym == 0) + { +! ch = PhTo8859_1(key); +! if (ch == -1 + #ifdef FEAT_MBYTE +! || (enc_utf8 && ch > 127) + #endif + ) + { + #ifdef FEAT_MBYTE +! len = PhKeyToMb(string, key); +! if (len > 0) + { + static char buf[6]; + int src_taken, dst_made; +! if (enc_utf8 != TRUE) + { + PxTranslateFromUTF( + charset_translate, +*************** +*** 2931,2943 **** + name_len = (int_u) ( mark - vim_font ); + + *font_name = vim_strnsave( vim_font, name_len ); +! if( *font_name != NULL ) + { +! if( mark != NULL ) + { +! while( *mark != NUL && *mark++ == ':') + { +! switch( tolower( *mark++ ) ) + { + case 'a': *font_flags |= PF_STYLE_ANTIALIAS; break; + case 'b': *font_flags |= PF_STYLE_BOLD; break; +--- 2931,2943 ---- + name_len = (int_u) ( mark - vim_font ); + + *font_name = vim_strnsave( vim_font, name_len ); +! if (*font_name != NULL) + { +! if (mark != NULL) + { +! while (*mark != NUL && *mark++ == ':') + { +! switch (tolower(*mark++)) + { + case 'a': *font_flags |= PF_STYLE_ANTIALIAS; break; + case 'b': *font_flags |= PF_STYLE_BOLD; break; +*************** +*** 2946,2952 **** + case 's': + size = getdigits( &mark ); + /* Restrict the size to some vague limits */ +! if( size < 1 || size > 100 ) + size = 8; + + *font_size = size; +--- 2946,2952 ---- + case 's': + size = getdigits( &mark ); + /* Restrict the size to some vague limits */ +! if (size < 1 || size > 100) + size = 8; + + *font_size = size; +*************** +*** 2973,2990 **** + FontQueryInfo info; + PhRect_t extent; + +! if( vim_font_name == NULL ) + { + /* Default font */ + vim_font_name = "PC Terminal"; + } + +! if( STRCMP( vim_font_name, "*" ) == 0 ) + { + font_tag = PtFontSelection( gui.vimWindow, NULL, NULL, + "pcterm12", -1, PHFONT_FIXED, NULL ); + +! if( font_tag == NULL ) + return FAIL; + + gui_mch_free_font( gui.norm_font ); +--- 2973,2990 ---- + FontQueryInfo info; + PhRect_t extent; + +! if (vim_font_name == NULL) + { + /* Default font */ + vim_font_name = "PC Terminal"; + } + +! if (STRCMP( vim_font_name, "*" ) == 0) + { + font_tag = PtFontSelection( gui.vimWindow, NULL, NULL, + "pcterm12", -1, PHFONT_FIXED, NULL ); + +! if (font_tag == NULL) + return FAIL; + + gui_mch_free_font( gui.norm_font ); +*************** +*** 2995,3006 **** + } + else + { +! if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, +! &font_size ) == FALSE ) + return FAIL; + + font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 ); +! if( font_tag == NULL ) + { + vim_free( font_name ); + return FAIL; +--- 2995,3006 ---- + } + else + { +! if (gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, +! &font_size ) == FALSE) + return FAIL; + + font_tag = gui_ph_get_font( font_name, font_flags, font_size, 0 ); +! if (font_tag == NULL) + { + vim_free( font_name ); + return FAIL; +*************** +*** 3053,3069 **** + int_u font_size = 12; + int_u font_flags = 0; + +! if( gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, +! &font_size ) != FALSE ) + { + font_tag = gui_ph_get_font( font_name, font_flags, font_size, -1 ); + vim_free( font_name ); + +! if( font_tag != NULL ) + return (GuiFont)font_tag; + } + +! if( report_error ) + EMSG2(e_font, vim_font_name ); + + return FAIL; +--- 3053,3069 ---- + int_u font_size = 12; + int_u font_flags = 0; + +! if (gui_ph_parse_font_name( vim_font_name, &font_name, &font_flags, +! &font_size ) != FALSE) + { + font_tag = gui_ph_get_font( font_name, font_flags, font_size, -1 ); + vim_free( font_name ); + +! if (font_tag != NULL) + return (GuiFont)font_tag; + } + +! if (report_error) + EMSG2(e_font, vim_font_name ); + + return FAIL; +*** ../vim-7.3.270/src/version.c 2011-08-10 12:10:55.000000000 +0200 +--- src/version.c 2011-08-10 12:17:06.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 271, + /**/ + +-- +An indication you must be a manager: +You believe you never have any problems in your life, just +"issues" and "improvement opportunities". + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.272 b/source/ap/vim/patches/7.3.272 new file mode 100644 index 000000000..b512a1fd7 --- /dev/null +++ b/source/ap/vim/patches/7.3.272 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.272 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.272 +Problem: ":put =list" does not add an empty line for a trailing empty + item. +Solution: Add a trailing NL when turning a list into a string. +Files: src/eval.c + + +*** ../vim-7.3.271/src/eval.c 2011-07-15 21:24:06.000000000 +0200 +--- src/eval.c 2011-08-10 12:31:51.000000000 +0200 +*************** +*** 1357,1363 **** +--- 1357,1367 ---- + { + ga_init2(&ga, (int)sizeof(char), 80); + if (tv.vval.v_list != NULL) ++ { + list_join(&ga, tv.vval.v_list, (char_u *)"\n", TRUE, 0); ++ if (tv.vval.v_list->lv_len > 0) ++ ga_append(&ga, NL); ++ } + ga_append(&ga, NUL); + retval = (char_u *)ga.ga_data; + } +*** ../vim-7.3.271/src/version.c 2011-08-10 12:19:00.000000000 +0200 +--- src/version.c 2011-08-10 12:36:41.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 272, + /**/ + +-- +Lose weight, NEVER Diet again with + The "Invisible Weight Loss Patch" + (spam e-mail) + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.273 b/source/ap/vim/patches/7.3.273 new file mode 100644 index 000000000..e74eb5a2a --- /dev/null +++ b/source/ap/vim/patches/7.3.273 @@ -0,0 +1,124 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.273 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.273 +Problem: A BOM in an error file is seen as text. (Aleksey Baibarin) +Solution: Remove the BOM from the text before evaluating. (idea by Christian + Brabandt) +Files: src/quickfix.c, src/mbyte.c, src/proto/mbyte.pro, + src/testdir/test10.in + + +*** ../vim-7.3.272/src/quickfix.c 2011-05-19 17:42:54.000000000 +0200 +--- src/quickfix.c 2011-08-10 12:56:15.000000000 +0200 +*************** +*** 561,566 **** +--- 561,570 ---- + break; + + IObuff[CMDBUFFSIZE - 2] = NUL; /* for very long lines */ ++ #ifdef FEAT_MBYTE ++ remove_bom(IObuff); ++ #endif ++ + if ((efmp = vim_strrchr(IObuff, '\n')) != NULL) + *efmp = NUL; + #ifdef USE_CRNL +*** ../vim-7.3.272/src/mbyte.c 2011-07-27 18:25:40.000000000 +0200 +--- src/mbyte.c 2011-08-10 13:11:56.000000000 +0200 +*************** +*** 838,843 **** +--- 838,864 ---- + } + + /* ++ * Remove all BOM from "s" by moving remaining text. ++ */ ++ void ++ remove_bom(s) ++ char_u *s; ++ { ++ if (enc_utf8) ++ { ++ char_u *p = s; ++ ++ while ((p = vim_strbyte(p, 0xef)) != NULL) ++ { ++ if (p[1] == 0xbb && p[2] == 0xbf) ++ STRMOVE(p, p + 3); ++ else ++ ++p; ++ } ++ } ++ } ++ ++ /* + * Get class of pointer: + * 0 for blank or NUL + * 1 for punctuation +*** ../vim-7.3.272/src/proto/mbyte.pro 2011-07-07 15:08:53.000000000 +0200 +--- src/proto/mbyte.pro 2011-08-10 12:50:44.000000000 +0200 +*************** +*** 2,7 **** +--- 2,8 ---- + int enc_canon_props __ARGS((char_u *name)); + char_u *mb_init __ARGS((void)); + int bomb_size __ARGS((void)); ++ void remove_bom __ARGS((char_u *s)); + int mb_get_class __ARGS((char_u *p)); + int dbcs_class __ARGS((unsigned lead, unsigned trail)); + int latin_char2len __ARGS((int c)); +*** ../vim-7.3.272/src/testdir/test10.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test10.in 2011-08-10 13:01:46.000000000 +0200 +*************** +*** 2,7 **** +--- 2,10 ---- + + STARTTEST + :so small.vim ++ :" Also test a BOM is ignored. ++ :so mbyte.vim ++ :set encoding=utf-8 + :/start of errorfile/,/end of errorfile/w! Xerrorfile + :/start of testfile/,/end of testfile/w! Xtestfile + :cf Xerrorfile +*************** +*** 20,26 **** + + start of errorfile + "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set. +! "Xtestfile", line 7 col 19; this is an error + gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c + Xtestfile:13: parse error before `asd' + make: *** [vim] Error 1 +--- 23,29 ---- + + start of errorfile + "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set. +! "Xtestfile", line 7 col 19; this is an error + gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c + Xtestfile:13: parse error before `asd' + make: *** [vim] Error 1 +*** ../vim-7.3.272/src/version.c 2011-08-10 12:38:02.000000000 +0200 +--- src/version.c 2011-08-10 13:14:35.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 273, + /**/ + +-- +Compilation process failed successfully. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.274 b/source/ap/vim/patches/7.3.274 new file mode 100644 index 000000000..48faf3cf0 --- /dev/null +++ b/source/ap/vim/patches/7.3.274 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.274 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.274 +Problem: With concealed characters tabs do not have the right size. +Solution: Use VCOL_HLC instead of vcol. (Eiichi Sato) +Files: src/screen.c + + +*** ../vim-7.3.273/src/screen.c 2011-03-22 13:29:20.000000000 +0100 +--- src/screen.c 2011-08-10 14:22:47.000000000 +0200 +*************** +*** 4252,4258 **** + { + /* tab amount depends on current column */ + n_extra = (int)wp->w_buffer->b_p_ts +! - vcol % (int)wp->w_buffer->b_p_ts - 1; + #ifdef FEAT_MBYTE + mb_utf8 = FALSE; /* don't draw as UTF-8 */ + #endif +--- 4252,4258 ---- + { + /* tab amount depends on current column */ + n_extra = (int)wp->w_buffer->b_p_ts +! - VCOL_HLC % (int)wp->w_buffer->b_p_ts - 1; + #ifdef FEAT_MBYTE + mb_utf8 = FALSE; /* don't draw as UTF-8 */ + #endif +*** ../vim-7.3.273/src/version.c 2011-08-10 13:21:30.000000000 +0200 +--- src/version.c 2011-08-10 14:23:38.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 274, + /**/ + +-- + Arthur pulls Pin out. The MONK blesses the grenade as ... +ARTHUR: (quietly) One, two, five ... +GALAHAD: Three, sir! +ARTHUR: Three. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.275 b/source/ap/vim/patches/7.3.275 new file mode 100644 index 000000000..2bdd145b9 --- /dev/null +++ b/source/ap/vim/patches/7.3.275 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.275 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.275 +Problem: MS-Windows: When using a black background some screen updates + cause the window to flicker. +Solution: Add WS_CLIPCHILDREN to CreateWindow(). (René Aguirre) +Files: src/gui_w32.c + + +*** ../vim-7.3.274/src/gui_w32.c 2011-07-07 17:43:37.000000000 +0200 +--- src/gui_w32.c 2011-08-10 14:40:58.000000000 +0200 +*************** +*** 1379,1385 **** + s_hwnd = CreateWindowEx( + WS_EX_MDICHILD, + szVimWndClass, "Vim MSWindows GUI", +! WS_OVERLAPPEDWINDOW | WS_CHILD | WS_CLIPSIBLINGS | 0xC000, + gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x, + gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y, + 100, /* Any value will do */ +--- 1379,1386 ---- + s_hwnd = CreateWindowEx( + WS_EX_MDICHILD, + szVimWndClass, "Vim MSWindows GUI", +! WS_OVERLAPPEDWINDOW | WS_CHILD +! | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | 0xC000, + gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x, + gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y, + 100, /* Any value will do */ +*************** +*** 1410,1416 **** + * titlebar, it will be reparented below. */ + s_hwnd = CreateWindow( + szVimWndClass, "Vim MSWindows GUI", +! win_socket_id == 0 ? WS_OVERLAPPEDWINDOW : WS_POPUP, + gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x, + gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y, + 100, /* Any value will do */ +--- 1411,1418 ---- + * titlebar, it will be reparented below. */ + s_hwnd = CreateWindow( + szVimWndClass, "Vim MSWindows GUI", +! (win_socket_id == 0 ? WS_OVERLAPPEDWINDOW : WS_POPUP) +! | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, + gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x, + gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y, + 100, /* Any value will do */ +*** ../vim-7.3.274/src/version.c 2011-08-10 14:32:33.000000000 +0200 +--- src/version.c 2011-08-10 14:39:14.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 275, + /**/ + +-- +ARTHUR: What does it say? +BROTHER MAYNARD: It reads ... "Here may be found the last words of Joseph of + Aramathea." "He who is valorous and pure of heart may find + the Holy Grail in the aaaaarrrrrrggghhh..." +ARTHUR: What? +BROTHER MAYNARD: "The Aaaaarrrrrrggghhh..." + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.276 b/source/ap/vim/patches/7.3.276 new file mode 100644 index 000000000..3af02457d --- /dev/null +++ b/source/ap/vim/patches/7.3.276 @@ -0,0 +1,130 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.276 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.276 +Problem: GvimExt sets $LANG in the wrong way. +Solution: Save the environment and use it for gvim. (Yasuhiro Matsumoto) +Files: src/GvimExt/gvimext.cpp + + +*** ../vim-7.3.275/src/GvimExt/gvimext.cpp 2011-07-20 17:27:17.000000000 +0200 +--- src/GvimExt/gvimext.cpp 2011-08-10 16:25:32.000000000 +0200 +*************** +*** 142,147 **** +--- 142,148 ---- + static int dyn_libintl_init(char *dir); + static void dyn_libintl_end(void); + ++ static wchar_t *oldenv = NULL; + static HINSTANCE hLibintlDLL = 0; + static char *(*dyn_libintl_gettext)(const char *) = null_libintl_gettext; + static char *(*dyn_libintl_textdomain)(const char *) = null_libintl_textdomain; +*************** +*** 339,346 **** + inc_cRefThisDLL() + { + #ifdef FEAT_GETTEXT +! if (g_cRefThisDll == 0) + dyn_gettext_load(); + #endif + InterlockedIncrement((LPLONG)&g_cRefThisDll); + } +--- 340,349 ---- + inc_cRefThisDLL() + { + #ifdef FEAT_GETTEXT +! if (g_cRefThisDll == 0) { + dyn_gettext_load(); ++ oldenv = GetEnvironmentStringsW(); ++ } + #endif + InterlockedIncrement((LPLONG)&g_cRefThisDll); + } +*************** +*** 349,356 **** + dec_cRefThisDLL() + { + #ifdef FEAT_GETTEXT +! if (InterlockedDecrement((LPLONG)&g_cRefThisDll) == 0) + dyn_gettext_free(); + #else + InterlockedDecrement((LPLONG)&g_cRefThisDll); + #endif +--- 352,364 ---- + dec_cRefThisDLL() + { + #ifdef FEAT_GETTEXT +! if (InterlockedDecrement((LPLONG)&g_cRefThisDll) == 0) { + dyn_gettext_free(); ++ if (oldenv != NULL) { ++ FreeEnvironmentStringsW(oldenv); ++ oldenv = NULL; ++ } ++ } + #else + InterlockedDecrement((LPLONG)&g_cRefThisDll); + #endif +*************** +*** 905,912 **** + NULL, // Process handle not inheritable. + NULL, // Thread handle not inheritable. + FALSE, // Set handle inheritance to FALSE. +! 0, // No creation flags. +! NULL, // Use parent's environment block. + NULL, // Use parent's starting directory. + &si, // Pointer to STARTUPINFO structure. + &pi) // Pointer to PROCESS_INFORMATION structure. +--- 913,920 ---- + NULL, // Process handle not inheritable. + NULL, // Thread handle not inheritable. + FALSE, // Set handle inheritance to FALSE. +! oldenv == NULL ? 0 : CREATE_UNICODE_ENVIRONMENT, +! oldenv, // Use unmodified environment block. + NULL, // Use parent's starting directory. + &si, // Pointer to STARTUPINFO structure. + &pi) // Pointer to PROCESS_INFORMATION structure. +*************** +*** 987,994 **** + NULL, // Process handle not inheritable. + NULL, // Thread handle not inheritable. + FALSE, // Set handle inheritance to FALSE. +! 0, // No creation flags. +! NULL, // Use parent's environment block. + NULL, // Use parent's starting directory. + &si, // Pointer to STARTUPINFO structure. + &pi) // Pointer to PROCESS_INFORMATION structure. +--- 995,1002 ---- + NULL, // Process handle not inheritable. + NULL, // Thread handle not inheritable. + FALSE, // Set handle inheritance to FALSE. +! oldenv == NULL ? 0 : CREATE_UNICODE_ENVIRONMENT, +! oldenv, // Use unmodified environment block. + NULL, // Use parent's starting directory. + &si, // Pointer to STARTUPINFO structure. + &pi) // Pointer to PROCESS_INFORMATION structure. +*** ../vim-7.3.275/src/version.c 2011-08-10 15:56:24.000000000 +0200 +--- src/version.c 2011-08-10 16:28:42.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 276, + /**/ + +-- +User: I'm having problems with my text editor. +Help desk: Which editor are you using? +User: I don't know, but it's version VI (pronounced: 6). +Help desk: Oh, then you should upgrade to version VIM (pronounced: 994). + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.277 b/source/ap/vim/patches/7.3.277 new file mode 100644 index 000000000..3509a1a6f --- /dev/null +++ b/source/ap/vim/patches/7.3.277 @@ -0,0 +1,348 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.277 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.277 +Problem: MS-Windows: some characters do not show in dialogs. +Solution: Use the wide methods when available. (Yanwei Jia) +Files: src/gui_w32.c, src/gui_w48.c, src/os_mswin.c, src/os_win32.c, + src/os_win32.h + + +*** ../vim-7.3.276/src/gui_w32.c 2011-08-10 15:56:24.000000000 +0200 +--- src/gui_w32.c 2011-08-10 16:52:55.000000000 +0200 +*************** +*** 1270,1275 **** +--- 1270,1294 ---- + pGetMonitorInfo = (TGetMonitorInfo)GetProcAddress(user32_lib, + "GetMonitorInfoA"); + } ++ ++ #ifdef FEAT_MBYTE ++ /* If the OS is Windows NT, use wide functions; ++ * this enables common dialogs input unicode from IME. */ ++ if (os_version.dwPlatformId == VER_PLATFORM_WIN32_NT) ++ { ++ pDispatchMessage = DispatchMessageW; ++ pGetMessage = GetMessageW; ++ pIsDialogMessage = IsDialogMessageW; ++ pPeekMessage = PeekMessageW; ++ } ++ else ++ { ++ pDispatchMessage = DispatchMessageA; ++ pGetMessage = GetMessageA; ++ pIsDialogMessage = IsDialogMessageA; ++ pPeekMessage = PeekMessageA; ++ } ++ #endif + } + + /* +*** ../vim-7.3.276/src/gui_w48.c 2010-10-20 21:22:17.000000000 +0200 +--- src/gui_w48.c 2011-08-10 16:49:39.000000000 +0200 +*************** +*** 390,396 **** + KillTimer(NULL, idEvent); + + /* Eat spurious WM_TIMER messages */ +! while (PeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + + if (blink_state == BLINK_ON) +--- 390,396 ---- + KillTimer(NULL, idEvent); + + /* Eat spurious WM_TIMER messages */ +! while (pPeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + + if (blink_state == BLINK_ON) +*************** +*** 418,424 **** + { + KillTimer(NULL, blink_timer); + /* Eat spurious WM_TIMER messages */ +! while (PeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + blink_timer = 0; + } +--- 418,424 ---- + { + KillTimer(NULL, blink_timer); + /* Eat spurious WM_TIMER messages */ +! while (pPeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + blink_timer = 0; + } +*************** +*** 476,482 **** + s_timed_out = TRUE; + + /* Eat spurious WM_TIMER messages */ +! while (PeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + if (idEvent == s_wait_timer) + s_wait_timer = 0; +--- 476,482 ---- + s_timed_out = TRUE; + + /* Eat spurious WM_TIMER messages */ +! while (pPeekMessage(&msg, hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + if (idEvent == s_wait_timer) + s_wait_timer = 0; +*************** +*** 1707,1713 **** + static char_u k10[] = {K_SPECIAL, 'k', ';', 0}; + #endif + +! GetMessage(&msg, NULL, 0, 0); + + #ifdef FEAT_OLE + /* Look after OLE Automation commands */ +--- 1707,1713 ---- + static char_u k10[] = {K_SPECIAL, 'k', ';', 0}; + #endif + +! pGetMessage(&msg, NULL, 0, 0); + + #ifdef FEAT_OLE + /* Look after OLE Automation commands */ +*************** +*** 1718,1724 **** + { + /* Message can't be ours, forward it. Fixes problem with Ultramon + * 3.0.4 */ +! DispatchMessage(&msg); + } + else + { +--- 1718,1724 ---- + { + /* Message can't be ours, forward it. Fixes problem with Ultramon + * 3.0.4 */ +! pDispatchMessage(&msg); + } + else + { +*************** +*** 1749,1762 **** + if (msg.message == WM_USER) + { + MyTranslateMessage(&msg); +! DispatchMessage(&msg); + return; + } + #endif + + #ifdef MSWIN_FIND_REPLACE + /* Don't process messages used by the dialog */ +! if (s_findrep_hwnd != NULL && IsDialogMessage(s_findrep_hwnd, &msg)) + { + HandleMouseHide(msg.message, msg.lParam); + return; +--- 1749,1762 ---- + if (msg.message == WM_USER) + { + MyTranslateMessage(&msg); +! pDispatchMessage(&msg); + return; + } + #endif + + #ifdef MSWIN_FIND_REPLACE + /* Don't process messages used by the dialog */ +! if (s_findrep_hwnd != NULL && pIsDialogMessage(s_findrep_hwnd, &msg)) + { + HandleMouseHide(msg.message, msg.lParam); + return; +*************** +*** 1928,1934 **** + if (vk != VK_F10 || check_map(k10, State, FALSE, TRUE, FALSE, + NULL, NULL) == NULL) + #endif +! DispatchMessage(&msg); + } + + /* +--- 1928,1934 ---- + if (vk != VK_F10 || check_map(k10, State, FALSE, TRUE, FALSE, + NULL, NULL) == NULL) + #endif +! pDispatchMessage(&msg); + } + + /* +*************** +*** 1943,1949 **** + MSG msg; + + if (!s_busy_processing) +! while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) + && !vim_is_input_buf_full()) + process_message(); + } +--- 1943,1949 ---- + MSG msg; + + if (!s_busy_processing) +! while (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) + && !vim_is_input_buf_full()) + process_message(); + } +*************** +*** 2019,2025 **** + KillTimer(NULL, s_wait_timer); + + /* Eat spurious WM_TIMER messages */ +! while (PeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + s_wait_timer = 0; + } +--- 2019,2025 ---- + KillTimer(NULL, s_wait_timer); + + /* Eat spurious WM_TIMER messages */ +! while (pPeekMessage(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) + ; + s_wait_timer = 0; + } +*** ../vim-7.3.276/src/os_mswin.c 2011-06-19 01:30:01.000000000 +0200 +--- src/os_mswin.c 2011-08-10 16:45:24.000000000 +0200 +*************** +*** 1856,1867 **** + { + MSG msg; + +! while (!*bUserAbort && PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { +! if (!hDlgPrint || !IsDialogMessage(hDlgPrint, &msg)) + { + TranslateMessage(&msg); +! DispatchMessage(&msg); + } + } + return !*bUserAbort; +--- 1856,1867 ---- + { + MSG msg; + +! while (!*bUserAbort && pPeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { +! if (!hDlgPrint || !pIsDialogMessage(hDlgPrint, &msg)) + { + TranslateMessage(&msg); +! pDispatchMessage(&msg); + } + } + return !*bUserAbort; +*************** +*** 3132,3141 **** + { + MSG msg; + +! while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! DispatchMessage(&msg); + } + } + +--- 3132,3141 ---- + { + MSG msg; + +! while (pPeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! pDispatchMessage(&msg); + } + } + +*** ../vim-7.3.276/src/os_win32.c 2011-07-07 16:20:45.000000000 +0200 +--- src/os_win32.c 2011-08-10 16:54:50.000000000 +0200 +*************** +*** 152,157 **** +--- 152,165 ---- + # define wcsicmp(a, b) wcscmpi((a), (b)) + #endif + ++ /* Enable common dialogs input unicode from IME if posible. */ ++ #ifdef FEAT_MBYTE ++ LRESULT (WINAPI *pDispatchMessage)(LPMSG) = DispatchMessage; ++ BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT) = GetMessage; ++ BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG) = IsDialogMessage; ++ BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT) = PeekMessage; ++ #endif ++ + #ifndef FEAT_GUI_W32 + /* Win32 Console handles for input and output */ + static HANDLE g_hConIn = INVALID_HANDLE_VALUE; +*************** +*** 3284,3293 **** + { + MSG msg; + +! if (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! DispatchMessage(&msg); + } + if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT) + break; +--- 3292,3301 ---- + { + MSG msg; + +! if (pPeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) + { + TranslateMessage(&msg); +! pDispatchMessage(&msg); + } + if (WaitForSingleObject(pi.hProcess, delay) != WAIT_TIMEOUT) + break; +*** ../vim-7.3.276/src/os_win32.h 2011-05-05 18:31:54.000000000 +0200 +--- src/os_win32.h 2011-08-10 16:51:58.000000000 +0200 +*************** +*** 193,195 **** +--- 193,209 ---- + #else + # define vim_mkdir(x, y) mch_mkdir(x) + #endif ++ ++ /* Enable common dialogs input unicode from IME if posible. */ ++ #ifdef FEAT_MBYTE ++ /* The variables are defined in os_win32.c. */ ++ extern LRESULT (WINAPI *pDispatchMessage)(LPMSG); ++ extern BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT); ++ extern BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG); ++ extern BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT); ++ #else ++ # define pDispatchMessage DispatchMessage ++ # define pGetMessage GetMessage ++ # define pIsDialogMessage IsDialogMessage ++ # define pPeekMessage PeekMessage ++ #endif +*** ../vim-7.3.276/src/version.c 2011-08-10 16:31:18.000000000 +0200 +--- src/version.c 2011-08-10 17:06:55.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 277, + /**/ + +-- +Veni, Vidi, VW -- I came, I saw, I drove around in a little car. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.278 b/source/ap/vim/patches/7.3.278 new file mode 100644 index 000000000..60bc0ac87 --- /dev/null +++ b/source/ap/vim/patches/7.3.278 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.278 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.278 +Problem: Passing the file name to open in VisVim doesn't work. +Solution: Adjust the index and check for end of buffer. (Jiri Sedlak) +Files: src/VisVim/Commands.cpp + + +*** ../vim-7.3.277/src/VisVim/Commands.cpp 2010-08-15 21:57:27.000000000 +0200 +--- src/VisVim/Commands.cpp 2011-08-10 17:21:27.000000000 +0200 +*************** +*** 549,555 **** + if (g_bNewTabs) + { + sprintf(VimCmd, ":tab drop "); +! s = VimCmd + 11; + } + else + { +--- 549,555 ---- + if (g_bNewTabs) + { + sprintf(VimCmd, ":tab drop "); +! s = VimCmd + 10; + } + else + { +*************** +*** 557,564 **** + s = VimCmd + 6; + } + sprintf(FileNameTmp, "%S", (char *)FileName); +! for (p = FileNameTmp; *p != '\0' && s < FileNameTmp + MAX_OLE_STR - 4; +! ++p) + if (*p == '\\') + *s++ = '/'; + else +--- 557,563 ---- + s = VimCmd + 6; + } + sprintf(FileNameTmp, "%S", (char *)FileName); +! for (p = FileNameTmp; *p != '\0' && s < VimCmd + MAX_OLE_STR - 4; ++p) + if (*p == '\\') + *s++ = '/'; + else +*** ../vim-7.3.277/src/version.c 2011-08-10 17:07:56.000000000 +0200 +--- src/version.c 2011-08-10 17:25:20.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 278, + /**/ + +-- +ARTHUR: But if he was dying, he wouldn't bother to carve + "Aaaaarrrrrrggghhh". He'd just say it. +BROTHER MAYNARD: It's down there carved in stone. +GALAHAD: Perhaps he was dictating. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.279 b/source/ap/vim/patches/7.3.279 new file mode 100644 index 000000000..6a8814b62 --- /dev/null +++ b/source/ap/vim/patches/7.3.279 @@ -0,0 +1,118 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.279 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.279 +Problem: With GTK, when gvim is full-screen and a tab is opened and using a + specific monitor configuration the window is too big. +Solution: Adjust the window size like on MS-Windows. (Yukihiro Nakadaira) +Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro + + +*** ../vim-7.3.278/src/gui.c 2011-06-26 04:48:56.000000000 +0200 +--- src/gui.c 2011-08-10 17:40:31.000000000 +0200 +*************** +*** 1407,1413 **** + if (!gui.shell_created) + return; + +! #ifdef MSWIN + /* If not setting to a user specified size and maximized, calculate the + * number of characters that fit in the maximized window. */ + if (!mustset && gui_mch_maximized()) +--- 1407,1413 ---- + if (!gui.shell_created) + return; + +! #if defined(MSWIN) || defined(FEAT_GUI_GTK) + /* If not setting to a user specified size and maximized, calculate the + * number of characters that fit in the maximized window. */ + if (!mustset && gui_mch_maximized()) +*** ../vim-7.3.278/src/gui_gtk_x11.c 2011-06-26 04:48:56.000000000 +0200 +--- src/gui_gtk_x11.c 2011-08-10 17:42:19.000000000 +0200 +*************** +*** 3900,3905 **** +--- 3900,3920 ---- + } + + /* ++ * Called when the font changed while the window is maximized. Compute the ++ * new Rows and Columns. This is like resizing the window. ++ */ ++ void ++ gui_mch_newfont() ++ { ++ int w, h; ++ ++ gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h); ++ w -= get_menu_tool_width(); ++ h -= get_menu_tool_height(); ++ gui_resize_shell(w, h); ++ } ++ ++ /* + * Set the windows size. + */ + void +*************** +*** 4409,4422 **** + + if (gui_mch_maximized()) + { +- int w, h; +- + /* Update lines and columns in accordance with the new font, keep the + * window maximized. */ +! gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h); +! w -= get_menu_tool_width(); +! h -= get_menu_tool_height(); +! gui_resize_shell(w, h); + } + else + { +--- 4424,4432 ---- + + if (gui_mch_maximized()) + { + /* Update lines and columns in accordance with the new font, keep the + * window maximized. */ +! gui_mch_newfont(); + } + else + { +*** ../vim-7.3.278/src/proto/gui_gtk_x11.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/gui_gtk_x11.pro 2011-08-10 17:42:29.000000000 +0200 +*************** +*** 20,25 **** +--- 20,26 ---- + void gui_mch_set_winpos __ARGS((int x, int y)); + int gui_mch_maximized __ARGS((void)); + void gui_mch_unmaximize __ARGS((void)); ++ void gui_mch_newfont __ARGS((void)); + void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction)); + void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h)); + void gui_mch_settitle __ARGS((char_u *title, char_u *icon)); +*** ../vim-7.3.278/src/version.c 2011-08-10 17:25:48.000000000 +0200 +--- src/version.c 2011-08-10 17:43:22.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 279, + /**/ + +-- +LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall? +ARTHUR: No, that's Saint Ives. + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.280 b/source/ap/vim/patches/7.3.280 new file mode 100644 index 000000000..1c1387aee --- /dev/null +++ b/source/ap/vim/patches/7.3.280 @@ -0,0 +1,181 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.280 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.280 +Problem: ":lmake" does not update the quickfix window title. +Solution: Update the title. (Lech Lorens) +Files: src/quickfix.c, src/testdir/test10.in, src/testdir/test10.ok + + +*** ../vim-7.3.279/src/quickfix.c 2011-08-10 13:21:30.000000000 +0200 +--- src/quickfix.c 2011-08-10 18:09:19.000000000 +0200 +*************** +*** 126,131 **** +--- 126,132 ---- + static win_T *qf_find_win __ARGS((qf_info_T *qi)); + static buf_T *qf_find_buf __ARGS((qf_info_T *qi)); + static void qf_update_buffer __ARGS((qf_info_T *qi)); ++ static void qf_set_title __ARGS((qf_info_T *qi)); + static void qf_fill_buffer __ARGS((qf_info_T *qi)); + #endif + static char_u *get_mef_name __ARGS((void)); +*************** +*** 2388,2395 **** + qf_fill_buffer(qi); + + if (qi->qf_lists[qi->qf_curlist].qf_title != NULL) +! set_internal_string_var((char_u *)"w:quickfix_title", +! qi->qf_lists[qi->qf_curlist].qf_title); + + curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index; + curwin->w_cursor.col = 0; +--- 2389,2395 ---- + qf_fill_buffer(qi); + + if (qi->qf_lists[qi->qf_curlist].qf_title != NULL) +! qf_set_title(qi); + + curwin->w_cursor.lnum = qi->qf_lists[qi->qf_curlist].qf_index; + curwin->w_cursor.col = 0; +*************** +*** 2526,2531 **** +--- 2526,2533 ---- + qf_info_T *qi; + { + buf_T *buf; ++ win_T *win; ++ win_T *curwin_save; + aco_save_T aco; + + /* Check if a buffer for the quickfix list exists. Update it. */ +*************** +*** 2537,2542 **** +--- 2539,2554 ---- + + qf_fill_buffer(qi); + ++ if (qi->qf_lists[qi->qf_curlist].qf_title != NULL ++ && (win = qf_find_win(qi)) != NULL) ++ { ++ curwin_save = curwin; ++ curwin = win; ++ qf_set_title(qi); ++ curwin = curwin_save; ++ ++ } ++ + /* restore curwin/curbuf and a few other things */ + aucmd_restbuf(&aco); + +*************** +*** 2544,2549 **** +--- 2556,2569 ---- + } + } + ++ static void ++ qf_set_title(qi) ++ qf_info_T *qi; ++ { ++ set_internal_string_var((char_u *)"w:quickfix_title", ++ qi->qf_lists[qi->qf_curlist].qf_title); ++ } ++ + /* + * Fill current buffer with quickfix errors, replacing any previous contents. + * curbuf must be the quickfix buffer! +*** ../vim-7.3.279/src/testdir/test10.in 2011-08-10 13:21:30.000000000 +0200 +--- src/testdir/test10.in 2011-08-10 18:28:31.000000000 +0200 +*************** +*** 5,13 **** + :" Also test a BOM is ignored. + :so mbyte.vim + :set encoding=utf-8 +! :/start of errorfile/,/end of errorfile/w! Xerrorfile + :/start of testfile/,/end of testfile/w! Xtestfile +! :cf Xerrorfile + rA + :cn + rB +--- 5,20 ---- + :" Also test a BOM is ignored. + :so mbyte.vim + :set encoding=utf-8 +! :7/start of errorfile/,/end of errorfile/w! Xerrorfile1 +! :7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2 + :/start of testfile/,/end of testfile/w! Xtestfile +! :cf Xerrorfile2 +! :clast +! :copen +! :let a=w:quickfix_title +! :wincmd p +! gR=a  +! :cf Xerrorfile1 + rA + :cn + rB +*************** +*** 17,22 **** +--- 24,34 ---- + rD + :cn + rE ++ :cn ++ :wincmd w ++ :let a=w:quickfix_title ++ :wincmd p ++ gR=a  + :w! test.out " Write contents of this file + :qa! + ENDTEST +*************** +*** 33,38 **** +--- 45,52 ---- + "Xtestfile", linenr 19: yet another problem + + Does anyone know what is the problem and how to correction it? ++ "Xtestfile", line 21 col 9: What is the title of the quickfix window? ++ "Xtestfile", line 22 col 9: What is the title of the quickfix window? + end of errorfile + + start of testfile +*** ../vim-7.3.279/src/testdir/test10.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test10.ok 2011-08-10 18:03:53.000000000 +0200 +*************** +*** 18,23 **** + line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + end of testfile +--- 18,23 ---- + line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 21 :cf Xerrorfile1xxxxxxxxxxxxxxx +! line 22 :cf Xerrorfile2xxxxxxxxxxxxxxx + end of testfile +*** ../vim-7.3.279/src/version.c 2011-08-10 17:44:41.000000000 +0200 +--- src/version.c 2011-08-10 18:35:52.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 280, + /**/ + +-- +"When I die, I want a tombstone that says "GAME OVER" - Ton Richters + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.281 b/source/ap/vim/patches/7.3.281 new file mode 100644 index 000000000..f90e95e13 --- /dev/null +++ b/source/ap/vim/patches/7.3.281 @@ -0,0 +1,134 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.281 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.281 +Problem: After using "expand('%:8')" the buffer name is changed. +Solution: Make a copy of the file name before shortening it. +Files: src/eval.c + + +*** ../vim-7.3.280/src/eval.c 2011-08-10 12:38:02.000000000 +0200 +--- src/eval.c 2011-08-17 15:12:39.000000000 +0200 +*************** +*** 23205,23210 **** +--- 23205,23211 ---- + int c; + int has_fullname = 0; + #ifdef WIN3264 ++ char_u *fname_start = *fnamep; + int has_shortname = 0; + #endif + +*************** +*** 23379,23402 **** + } + + #ifdef WIN3264 +! /* Check shortname after we have done 'heads' and before we do 'tails' + */ + if (has_shortname) + { +! pbuf = NULL; +! /* Copy the string if it is shortened by :h */ +! if (*fnamelen < (int)STRLEN(*fnamep)) + { + p = vim_strnsave(*fnamep, *fnamelen); +! if (p == 0) + return -1; + vim_free(*bufp); + *bufp = *fnamep = p; + } + + /* Split into two implementations - makes it easier. First is where +! * there isn't a full name already, second is where there is. +! */ + if (!has_fullname && !vim_isAbsName(*fnamep)) + { + if (shortpath_for_partial(fnamep, bufp, fnamelen) == FAIL) +--- 23380,23404 ---- + } + + #ifdef WIN3264 +! /* +! * Handle ":8" after we have done 'heads' and before we do 'tails'. + */ + if (has_shortname) + { +! /* Copy the string if it is shortened by :h and when it wasn't copied +! * yet, because we are going to change it in place. Avoids changing +! * the buffer name for "%:8". */ +! if (*fnamelen < (int)STRLEN(*fnamep) || *fnamep == fname_start) + { + p = vim_strnsave(*fnamep, *fnamelen); +! if (p == NULL) + return -1; + vim_free(*bufp); + *bufp = *fnamep = p; + } + + /* Split into two implementations - makes it easier. First is where +! * there isn't a full name already, second is where there is. */ + if (!has_fullname && !vim_isAbsName(*fnamep)) + { + if (shortpath_for_partial(fnamep, bufp, fnamelen) == FAIL) +*************** +*** 23404,23421 **** + } + else + { +! int l; + +! /* Simple case, already have the full-name + * Nearly always shorter, so try first time. */ +- l = *fnamelen; + if (get_short_pathname(fnamep, bufp, &l) == FAIL) + return -1; + + if (l == 0) + { +! /* Couldn't find the filename.. search the paths. +! */ + l = *fnamelen; + if (shortpath_for_invalid_fname(fnamep, bufp, &l) == FAIL) + return -1; +--- 23406,23421 ---- + } + else + { +! int l = *fnamelen; + +! /* Simple case, already have the full-name. + * Nearly always shorter, so try first time. */ + if (get_short_pathname(fnamep, bufp, &l) == FAIL) + return -1; + + if (l == 0) + { +! /* Couldn't find the filename, search the paths. */ + l = *fnamelen; + if (shortpath_for_invalid_fname(fnamep, bufp, &l) == FAIL) + return -1; +*** ../vim-7.3.280/src/version.c 2011-08-10 18:36:49.000000000 +0200 +--- src/version.c 2011-08-17 15:21:41.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 281, + /**/ + +-- +Kisses may last for as much as, but no more than, five minutes. + [real standing law in Iowa, United States of America] + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.282 b/source/ap/vim/patches/7.3.282 new file mode 100644 index 000000000..dcd16806e --- /dev/null +++ b/source/ap/vim/patches/7.3.282 @@ -0,0 +1,60 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.282 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.282 +Problem: When using input() and :echo in a loop the displayed text is + incorrect. (Benjamin Fritz) +Solution: Only restore the cursor position when there is a command line. + (Ben Schmidt) +Files: src/ex_getln.c + + +*** ../vim-7.3.281/src/ex_getln.c 2011-07-27 17:58:42.000000000 +0200 +--- src/ex_getln.c 2011-08-17 15:57:39.000000000 +0200 +*************** +*** 1969,1976 **** + # endif + s = getcmdline(firstc, 1L, 0); + restore_cmdline(&save_ccline); +! /* Restore msg_col, the prompt from input() may have changed it. */ +! msg_col = msg_col_save; + + return s; + } +--- 1969,1980 ---- + # endif + s = getcmdline(firstc, 1L, 0); + restore_cmdline(&save_ccline); +! /* Restore msg_col, the prompt from input() may have changed it. +! * But only if called recursively and the commandline is therefore being +! * restored to an old one; if not, the input() prompt stays on the screen, +! * so we need its modified msg_col left intact. */ +! if (ccline.cmdbuff != NULL) +! msg_col = msg_col_save; + + return s; + } +*** ../vim-7.3.281/src/version.c 2011-08-17 15:23:16.000000000 +0200 +--- src/version.c 2011-08-17 16:24:04.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 282, + /**/ + +-- +Why don't cannibals eat clowns? +Because they taste funny. + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.283 b/source/ap/vim/patches/7.3.283 new file mode 100644 index 000000000..1a3a6358c --- /dev/null +++ b/source/ap/vim/patches/7.3.283 @@ -0,0 +1,114 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.283 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.283 +Problem: An expression mapping with a multi-byte character containing a + 0x80 byte gets messed up. (ZyX) +Solution: Unescape the expression before evaluating it (Yukihiro Nakadaira) +Files: src/getchar.c + + +*** ../vim-7.3.282/src/getchar.c 2011-04-28 17:30:05.000000000 +0200 +--- src/getchar.c 2011-08-17 17:04:38.000000000 +0200 +*************** +*** 3262,3270 **** + validate_maphash(); + + /* +! * find end of keys and skip CTRL-Vs (and backslashes) in it + * Accept backslash like CTRL-V when 'cpoptions' does not contain 'B'. +! * with :unmap white space is included in the keys, no argument possible + */ + p = keys; + do_backslash = (vim_strchr(p_cpo, CPO_BSLASH) == NULL); +--- 3262,3270 ---- + validate_maphash(); + + /* +! * Find end of keys and skip CTRL-Vs (and backslashes) in it. + * Accept backslash like CTRL-V when 'cpoptions' does not contain 'B'. +! * with :unmap white space is included in the keys, no argument possible. + */ + p = keys; + do_backslash = (vim_strchr(p_cpo, CPO_BSLASH) == NULL); +*************** +*** 4506,4517 **** +--- 4506,4528 ---- + { + char_u *res; + char_u *p; ++ char_u *expr; + char_u *save_cmd; + pos_T save_cursor; + ++ /* Remove escaping of CSI, because "str" is in a format to be used as ++ * typeahead. */ ++ expr = vim_strsave(str); ++ if (expr == NULL) ++ return NULL; ++ vim_unescape_csi(expr); ++ + save_cmd = save_cmdline_alloc(); + if (save_cmd == NULL) ++ { ++ vim_free(expr); + return NULL; ++ } + + /* Forbid changing text or using ":normal" to avoid most of the bad side + * effects. Also restore the cursor position. */ +*************** +*** 4521,4527 **** + #endif + set_vim_var_char(c); /* set v:char to the typed character */ + save_cursor = curwin->w_cursor; +! p = eval_to_string(str, NULL, FALSE); + --textlock; + #ifdef FEAT_EX_EXTRA + --ex_normal_lock; +--- 4532,4538 ---- + #endif + set_vim_var_char(c); /* set v:char to the typed character */ + save_cursor = curwin->w_cursor; +! p = eval_to_string(expr, NULL, FALSE); + --textlock; + #ifdef FEAT_EX_EXTRA + --ex_normal_lock; +*************** +*** 4529,4536 **** +--- 4540,4550 ---- + curwin->w_cursor = save_cursor; + + restore_cmdline_alloc(save_cmd); ++ vim_free(expr); ++ + if (p == NULL) + return NULL; ++ /* Escape CSI in the result to be able to use the string as typeahead. */ + res = vim_strsave_escape_csi(p); + vim_free(p); + +*** ../vim-7.3.282/src/version.c 2011-08-17 16:25:43.000000000 +0200 +--- src/version.c 2011-08-17 17:17:03.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 283, + /**/ + +-- +bashian roulette: +$ ((RANDOM%6)) || rm -rf ~ + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.284 b/source/ap/vim/patches/7.3.284 new file mode 100644 index 000000000..c621ced63 --- /dev/null +++ b/source/ap/vim/patches/7.3.284 @@ -0,0 +1,211 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.284 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.284 +Problem: The str2special() function doesn't handle multi-byte characters + properly. +Solution: Recognize multi-byte characters. (partly by Vladimir Vichniakov) +Files: src/getchar.c, src/message.c, src/misc2.c + + +*** ../vim-7.3.283/src/getchar.c 2011-08-17 17:18:14.000000000 +0200 +--- src/getchar.c 2011-08-17 20:11:58.000000000 +0200 +*************** +*** 3964,3970 **** + if (*mp->m_str == NUL) + msg_puts_attr((char_u *)"", hl_attr(HLF_8)); + else +! msg_outtrans_special(mp->m_str, FALSE); + #ifdef FEAT_EVAL + if (p_verbose > 0) + last_set_msg(mp->m_script_ID); +--- 3964,3980 ---- + if (*mp->m_str == NUL) + msg_puts_attr((char_u *)"", hl_attr(HLF_8)); + else +! { +! /* Remove escaping of CSI, because "m_str" is in a format to be used +! * as typeahead. */ +! char_u *s = vim_strsave(mp->m_str); +! if (s != NULL) +! { +! vim_unescape_csi(s); +! msg_outtrans_special(s, FALSE); +! vim_free(s); +! } +! } + #ifdef FEAT_EVAL + if (p_verbose > 0) + last_set_msg(mp->m_script_ID); +*** ../vim-7.3.283/src/message.c 2011-03-22 13:07:19.000000000 +0100 +--- src/message.c 2011-08-17 18:40:10.000000000 +0200 +*************** +*** 1547,1562 **** + if (IS_SPECIAL(c) || modifiers) /* special key */ + special = TRUE; + } +- *sp = str + 1; + + #ifdef FEAT_MBYTE +! /* For multi-byte characters check for an illegal byte. */ +! if (has_mbyte && MB_BYTE2LEN(*str) > (*mb_ptr2len)(str)) + { +! transchar_nonprint(buf, c); +! return buf; + } + #endif + + /* Make unprintable characters in <> form, also and . + * Use only for lhs of a mapping. */ +--- 1547,1573 ---- + if (IS_SPECIAL(c) || modifiers) /* special key */ + special = TRUE; + } + + #ifdef FEAT_MBYTE +! if (has_mbyte && !IS_SPECIAL(c)) + { +! int len = (*mb_ptr2len)(str); +! +! /* For multi-byte characters check for an illegal byte. */ +! if (has_mbyte && MB_BYTE2LEN(*str) > len) +! { +! transchar_nonprint(buf, c); +! *sp = str + 1; +! return buf; +! } +! /* Since 'special' is TRUE the multi-byte character 'c' will be +! * processed by get_special_key_name() */ +! c = (*mb_ptr2char)(str); +! *sp = str + len; + } ++ else + #endif ++ *sp = str + 1; + + /* Make unprintable characters in <> form, also and . + * Use only for lhs of a mapping. */ +*** ../vim-7.3.283/src/misc2.c 2011-07-27 17:31:42.000000000 +0200 +--- src/misc2.c 2011-08-17 20:27:30.000000000 +0200 +*************** +*** 2754,2759 **** +--- 2754,2760 ---- + int bit; + int key; + unsigned long n; ++ int l; + + src = *srcp; + if (src[0] != '<') +*************** +*** 2766,2773 **** + if (*bp == '-') + { + last_dash = bp; +! if (bp[1] != NUL && bp[2] == '>') +! ++bp; /* anything accepted, like */ + } + if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3]) + bp += 3; /* skip t_xx, xx may be '-' or '>' */ +--- 2767,2783 ---- + if (*bp == '-') + { + last_dash = bp; +! if (bp[1] != NUL) +! { +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! l = mb_ptr2len(bp + 1); +! else +! #endif +! l = 1; +! if (bp[l + 1] == '>') +! bp += l; /* anything accepted, like */ +! } + } + if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3]) + bp += 3; /* skip t_xx, xx may be '-' or '>' */ +*************** +*** 2777,2791 **** + { + end_of_name = bp + 1; + +- if (STRNICMP(src + 1, "char-", 5) == 0 && VIM_ISDIGIT(src[6])) +- { +- /* or or */ +- vim_str2nr(src + 6, NULL, NULL, TRUE, TRUE, NULL, &n); +- *modp = 0; +- *srcp = end_of_name; +- return (int)n; +- } +- + /* Which modifiers are given? */ + modifiers = 0x0; + for (bp = src + 1; bp < last_dash; bp++) +--- 2787,2792 ---- +*************** +*** 2804,2814 **** + */ + if (bp >= last_dash) + { + /* + * Modifier with single letter, or special key name. + */ +! if (modifiers != 0 && last_dash[2] == '>') +! key = last_dash[1]; + else + { + key = get_special_key_code(last_dash + 1); +--- 2805,2831 ---- + */ + if (bp >= last_dash) + { ++ if (STRNICMP(last_dash + 1, "char-", 5) == 0 ++ && VIM_ISDIGIT(last_dash[6])) ++ { ++ /* or or */ ++ vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n); ++ *modp = modifiers; ++ *srcp = end_of_name; ++ return (int)n; ++ } ++ + /* + * Modifier with single letter, or special key name. + */ +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! l = mb_ptr2len(last_dash + 1); +! else +! #endif +! l = 1; +! if (modifiers != 0 && last_dash[l + 1] == '>') +! key = PTR2CHAR(last_dash + 1); + else + { + key = get_special_key_code(last_dash + 1); +*** ../vim-7.3.283/src/version.c 2011-08-17 17:18:14.000000000 +0200 +--- src/version.c 2011-08-17 20:27:47.000000000 +0200 +*************** +*** 711,712 **** +--- 711,714 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 284, + /**/ + +-- +Snoring is prohibited unless all bedroom windows are closed and securely +locked. + [real standing law in Massachusetts, United States of America] + + /// 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 /// diff --git a/source/ap/vim/patches/7.3.285 b/source/ap/vim/patches/7.3.285 new file mode 100644 index 000000000..24be28bc0 --- /dev/null +++ b/source/ap/vim/patches/7.3.285 @@ -0,0 +1,144 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.285 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.285 (after 7.3.284) +Problem: Mapping no longer works. +Solution: Properly check for "char-". Add a test for it. +Files: src/misc2.c, src/testdir/test75.in, src/testdir/test75.ok + + +*** ../vim-7.3.284/src/misc2.c 2011-08-17 20:33:18.000000000 +0200 +--- src/misc2.c 2011-08-19 22:08:37.000000000 +0200 +*************** +*** 2781,2786 **** +--- 2781,2792 ---- + } + if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3]) + bp += 3; /* skip t_xx, xx may be '-' or '>' */ ++ else if (STRNICMP(bp, "char-", 5) == 0) ++ { ++ vim_str2nr(bp + 5, NULL, &l, TRUE, TRUE, NULL, NULL); ++ bp += l + 5; ++ break; ++ } + } + + if (*bp == '>') /* found matching '>' */ +*************** +*** 2810,2836 **** + { + /* or or */ + vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n); +! *modp = modifiers; +! *srcp = end_of_name; +! return (int)n; + } +- +- /* +- * Modifier with single letter, or special key name. +- */ +- #ifdef FEAT_MBYTE +- if (has_mbyte) +- l = mb_ptr2len(last_dash + 1); +- else +- #endif +- l = 1; +- if (modifiers != 0 && last_dash[l + 1] == '>') +- key = PTR2CHAR(last_dash + 1); + else + { +! key = get_special_key_code(last_dash + 1); +! if (!keep_x_key) +! key = handle_x_keys(key); + } + + /* +--- 2816,2842 ---- + { + /* or or */ + vim_str2nr(last_dash + 6, NULL, NULL, TRUE, TRUE, NULL, &n); +! key = (int)n; + } + else + { +! /* +! * Modifier with single letter, or special key name. +! */ +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! l = mb_ptr2len(last_dash + 1); +! else +! #endif +! l = 1; +! if (modifiers != 0 && last_dash[l + 1] == '>') +! key = PTR2CHAR(last_dash + 1); +! else +! { +! key = get_special_key_code(last_dash + 1); +! if (!keep_x_key) +! key = handle_x_keys(key); +! } + } + + /* +*** ../vim-7.3.284/src/testdir/test75.in 2010-10-20 21:22:17.000000000 +0200 +--- src/testdir/test75.in 2011-08-19 22:05:13.000000000 +0200 +*************** +*** 2,7 **** +--- 2,8 ---- + + STARTTEST + :so small.vim ++ :set cpo-=< + :" Test maparg() with a string result + :map foo isfoo + :vnoremap