Mercurial > vim
annotate src/version.c @ 6098:975d96776111 v7.4.387
updated for version 7.4.387
Problem: "4gro" replaces one character then executes "ooo". (Urtica Dioica)
Solution: Write the ESC in the second stuff buffer.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 30 Jul 2014 16:00:58 +0200 |
parents | 09af7cb358f0 |
children | 76e7fb736c0e |
rev | line source |
---|---|
7 | 1 /* vi:set ts=8 sts=4 sw=4: |
2 * | |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
5 * Do ":help uganda" in Vim to read copying and usage conditions. | |
6 * Do ":help credits" in Vim to see a list of people who contributed. | |
7 * See README.txt for an overview of the Vim source code. | |
8 */ | |
9 | |
10 #include "vim.h" | |
11 | |
12 #ifdef AMIGA | |
13 # include <time.h> /* for time() */ | |
14 #endif | |
15 | |
16 /* | |
17 * Vim originated from Stevie version 3.6 (Fish disk 217) by GRWalter (Fred) | |
18 * It has been changed beyond recognition since then. | |
19 * | |
26 | 20 * Differences between version 6.x and 7.x can be found with ":help version7". |
7 | 21 * Differences between version 5.x and 6.x can be found with ":help version6". |
22 * Differences between version 4.x and 5.x can be found with ":help version5". | |
23 * Differences between version 3.0 and 4.x can be found with ":help version4". | |
24 * All the remarks about older versions have been removed, they are not very | |
25 * interesting. | |
26 */ | |
27 | |
28 #include "version.h" | |
29 | |
378 | 30 char *Version = VIM_VERSION_SHORT; |
31 static char *mediumVersion = VIM_VERSION_MEDIUM; | |
7 | 32 |
33 #if defined(HAVE_DATE_TIME) || defined(PROTO) | |
34 # if (defined(VMS) && defined(VAXC)) || defined(PROTO) | |
35 char longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__) | |
36 + sizeof(__TIME__) + 3]; | |
4147 | 37 |
7 | 38 void |
39 make_version() | |
40 { | |
41 /* | |
42 * Construct the long version string. Necessary because | |
43 * VAX C can't catenate strings in the preprocessor. | |
44 */ | |
45 strcpy(longVersion, VIM_VERSION_LONG_DATE); | |
46 strcat(longVersion, __DATE__); | |
47 strcat(longVersion, " "); | |
48 strcat(longVersion, __TIME__); | |
49 strcat(longVersion, ")"); | |
50 } | |
51 # else | |
52 char *longVersion = VIM_VERSION_LONG_DATE __DATE__ " " __TIME__ ")"; | |
53 # endif | |
54 #else | |
55 char *longVersion = VIM_VERSION_LONG; | |
56 #endif | |
57 | |
5166
467efeee8f9e
updated for version 7.4a.009
Bram Moolenaar <bram@vim.org>
parents:
5164
diff
changeset
|
58 static void list_features __ARGS((void)); |
7 | 59 static void version_msg __ARGS((char *s)); |
60 | |
61 static char *(features[]) = | |
62 { | |
5316 | 63 #ifdef HAVE_ACL |
64 "+acl", | |
65 #else | |
66 "-acl", | |
67 #endif | |
7 | 68 #ifdef AMIGA /* only for Amiga systems */ |
69 # ifdef FEAT_ARP | |
70 "+ARP", | |
71 # else | |
72 "-ARP", | |
73 # endif | |
74 #endif | |
75 #ifdef FEAT_ARABIC | |
76 "+arabic", | |
77 #else | |
78 "-arabic", | |
79 #endif | |
80 #ifdef FEAT_AUTOCMD | |
81 "+autocmd", | |
82 #else | |
83 "-autocmd", | |
84 #endif | |
85 #ifdef FEAT_BEVAL | |
86 "+balloon_eval", | |
87 #else | |
88 "-balloon_eval", | |
89 #endif | |
90 #ifdef FEAT_BROWSE | |
91 "+browse", | |
92 #else | |
93 "-browse", | |
94 #endif | |
95 #ifdef NO_BUILTIN_TCAPS | |
96 "-builtin_terms", | |
97 #endif | |
98 #ifdef SOME_BUILTIN_TCAPS | |
99 "+builtin_terms", | |
100 #endif | |
101 #ifdef ALL_BUILTIN_TCAPS | |
102 "++builtin_terms", | |
103 #endif | |
104 #ifdef FEAT_BYTEOFF | |
105 "+byte_offset", | |
106 #else | |
107 "-byte_offset", | |
108 #endif | |
109 #ifdef FEAT_CINDENT | |
110 "+cindent", | |
111 #else | |
112 "-cindent", | |
113 #endif | |
114 #ifdef FEAT_CLIENTSERVER | |
115 "+clientserver", | |
116 #else | |
117 "-clientserver", | |
118 #endif | |
119 #ifdef FEAT_CLIPBOARD | |
120 "+clipboard", | |
121 #else | |
122 "-clipboard", | |
123 #endif | |
124 #ifdef FEAT_CMDL_COMPL | |
125 "+cmdline_compl", | |
126 #else | |
127 "-cmdline_compl", | |
128 #endif | |
129 #ifdef FEAT_CMDHIST | |
130 "+cmdline_hist", | |
131 #else | |
132 "-cmdline_hist", | |
133 #endif | |
134 #ifdef FEAT_CMDL_INFO | |
135 "+cmdline_info", | |
136 #else | |
137 "-cmdline_info", | |
138 #endif | |
139 #ifdef FEAT_COMMENTS | |
140 "+comments", | |
141 #else | |
142 "-comments", | |
143 #endif | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
144 #ifdef FEAT_CONCEAL |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
145 "+conceal", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
146 #else |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
147 "-conceal", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
148 #endif |
7 | 149 #ifdef FEAT_CRYPT |
150 "+cryptv", | |
151 #else | |
152 "-cryptv", | |
153 #endif | |
154 #ifdef FEAT_CSCOPE | |
155 "+cscope", | |
156 #else | |
157 "-cscope", | |
158 #endif | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
159 #ifdef FEAT_CURSORBIND |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
160 "+cursorbind", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
161 #else |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
162 "-cursorbind", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
163 #endif |
647 | 164 #ifdef CURSOR_SHAPE |
165 "+cursorshape", | |
166 #else | |
167 "-cursorshape", | |
168 #endif | |
7 | 169 #if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG) |
170 "+dialog_con_gui", | |
171 #else | |
172 # if defined(FEAT_CON_DIALOG) | |
173 "+dialog_con", | |
174 # else | |
175 # if defined(FEAT_GUI_DIALOG) | |
176 "+dialog_gui", | |
177 # else | |
178 "-dialog", | |
179 # endif | |
180 # endif | |
181 #endif | |
182 #ifdef FEAT_DIFF | |
183 "+diff", | |
184 #else | |
185 "-diff", | |
186 #endif | |
187 #ifdef FEAT_DIGRAPHS | |
188 "+digraphs", | |
189 #else | |
190 "-digraphs", | |
191 #endif | |
192 #ifdef FEAT_DND | |
193 "+dnd", | |
194 #else | |
195 "-dnd", | |
196 #endif | |
197 #ifdef EBCDIC | |
198 "+ebcdic", | |
199 #else | |
200 "-ebcdic", | |
201 #endif | |
202 #ifdef FEAT_EMACS_TAGS | |
203 "+emacs_tags", | |
204 #else | |
205 "-emacs_tags", | |
206 #endif | |
207 #ifdef FEAT_EVAL | |
208 "+eval", | |
209 #else | |
210 "-eval", | |
211 #endif | |
212 #ifdef FEAT_EX_EXTRA | |
213 "+ex_extra", | |
214 #else | |
215 "-ex_extra", | |
216 #endif | |
217 #ifdef FEAT_SEARCH_EXTRA | |
218 "+extra_search", | |
219 #else | |
220 "-extra_search", | |
221 #endif | |
222 #ifdef FEAT_FKMAP | |
223 "+farsi", | |
224 #else | |
225 "-farsi", | |
226 #endif | |
227 #ifdef FEAT_SEARCHPATH | |
228 "+file_in_path", | |
229 #else | |
230 "-file_in_path", | |
231 #endif | |
232 #ifdef FEAT_FIND_ID | |
233 "+find_in_path", | |
234 #else | |
235 "-find_in_path", | |
236 #endif | |
1621 | 237 #ifdef FEAT_FLOAT |
238 "+float", | |
239 #else | |
240 "-float", | |
241 #endif | |
7 | 242 #ifdef FEAT_FOLDING |
243 "+folding", | |
244 #else | |
245 "-folding", | |
246 #endif | |
247 #ifdef FEAT_FOOTER | |
248 "+footer", | |
249 #else | |
250 "-footer", | |
251 #endif | |
252 /* only interesting on Unix systems */ | |
253 #if !defined(USE_SYSTEM) && defined(UNIX) | |
254 "+fork()", | |
255 #endif | |
256 #ifdef FEAT_GETTEXT | |
257 # ifdef DYNAMIC_GETTEXT | |
258 "+gettext/dyn", | |
259 # else | |
260 "+gettext", | |
261 # endif | |
262 #else | |
263 "-gettext", | |
264 #endif | |
265 #ifdef FEAT_HANGULIN | |
266 "+hangul_input", | |
267 #else | |
268 "-hangul_input", | |
269 #endif | |
270 #if (defined(HAVE_ICONV_H) && defined(USE_ICONV)) || defined(DYNAMIC_ICONV) | |
271 # ifdef DYNAMIC_ICONV | |
272 "+iconv/dyn", | |
273 # else | |
274 "+iconv", | |
275 # endif | |
276 #else | |
277 "-iconv", | |
278 #endif | |
279 #ifdef FEAT_INS_EXPAND | |
280 "+insert_expand", | |
281 #else | |
282 "-insert_expand", | |
283 #endif | |
284 #ifdef FEAT_JUMPLIST | |
285 "+jumplist", | |
286 #else | |
287 "-jumplist", | |
288 #endif | |
289 #ifdef FEAT_KEYMAP | |
290 "+keymap", | |
291 #else | |
292 "-keymap", | |
293 #endif | |
294 #ifdef FEAT_LANGMAP | |
295 "+langmap", | |
296 #else | |
297 "-langmap", | |
298 #endif | |
299 #ifdef FEAT_LIBCALL | |
300 "+libcall", | |
301 #else | |
302 "-libcall", | |
303 #endif | |
304 #ifdef FEAT_LINEBREAK | |
305 "+linebreak", | |
306 #else | |
307 "-linebreak", | |
308 #endif | |
309 #ifdef FEAT_LISP | |
310 "+lispindent", | |
311 #else | |
312 "-lispindent", | |
313 #endif | |
314 #ifdef FEAT_LISTCMDS | |
315 "+listcmds", | |
316 #else | |
317 "-listcmds", | |
318 #endif | |
319 #ifdef FEAT_LOCALMAP | |
320 "+localmap", | |
321 #else | |
322 "-localmap", | |
323 #endif | |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
324 #ifdef FEAT_LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
325 # ifdef DYNAMIC_LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
326 "+lua/dyn", |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
327 # else |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
328 "+lua", |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
329 # endif |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
330 #else |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
331 "-lua", |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
332 #endif |
7 | 333 #ifdef FEAT_MENU |
334 "+menu", | |
335 #else | |
336 "-menu", | |
337 #endif | |
338 #ifdef FEAT_SESSION | |
339 "+mksession", | |
340 #else | |
341 "-mksession", | |
342 #endif | |
343 #ifdef FEAT_MODIFY_FNAME | |
344 "+modify_fname", | |
345 #else | |
346 "-modify_fname", | |
347 #endif | |
348 #ifdef FEAT_MOUSE | |
349 "+mouse", | |
350 # ifdef FEAT_MOUSESHAPE | |
351 "+mouseshape", | |
352 # else | |
353 "-mouseshape", | |
354 # endif | |
355 # else | |
356 "-mouse", | |
357 #endif | |
3898 | 358 |
7 | 359 #if defined(UNIX) || defined(VMS) |
360 # ifdef FEAT_MOUSE_DEC | |
361 "+mouse_dec", | |
362 # else | |
363 "-mouse_dec", | |
364 # endif | |
365 # ifdef FEAT_MOUSE_GPM | |
366 "+mouse_gpm", | |
367 # else | |
368 "-mouse_gpm", | |
369 # endif | |
370 # ifdef FEAT_MOUSE_JSB | |
371 "+mouse_jsbterm", | |
372 # else | |
373 "-mouse_jsbterm", | |
374 # endif | |
375 # ifdef FEAT_MOUSE_NET | |
376 "+mouse_netterm", | |
377 # else | |
378 "-mouse_netterm", | |
379 # endif | |
380 #endif | |
3898 | 381 |
7 | 382 #ifdef __QNX__ |
383 # ifdef FEAT_MOUSE_PTERM | |
384 "+mouse_pterm", | |
385 # else | |
386 "-mouse_pterm", | |
387 # endif | |
388 #endif | |
3898 | 389 |
390 #if defined(UNIX) || defined(VMS) | |
391 # ifdef FEAT_MOUSE_SGR | |
392 "+mouse_sgr", | |
393 # else | |
394 "-mouse_sgr", | |
395 # endif | |
396 # ifdef FEAT_SYSMOUSE | |
397 "+mouse_sysmouse", | |
398 # else | |
399 "-mouse_sysmouse", | |
400 # endif | |
401 # ifdef FEAT_MOUSE_URXVT | |
402 "+mouse_urxvt", | |
403 # else | |
404 "-mouse_urxvt", | |
405 # endif | |
406 # ifdef FEAT_MOUSE_XTERM | |
407 "+mouse_xterm", | |
408 # else | |
409 "-mouse_xterm", | |
410 # endif | |
411 #endif | |
412 | |
7 | 413 #ifdef FEAT_MBYTE_IME |
414 # ifdef DYNAMIC_IME | |
415 "+multi_byte_ime/dyn", | |
416 # else | |
417 "+multi_byte_ime", | |
418 # endif | |
419 #else | |
420 # ifdef FEAT_MBYTE | |
421 "+multi_byte", | |
422 # else | |
423 "-multi_byte", | |
424 # endif | |
425 #endif | |
426 #ifdef FEAT_MULTI_LANG | |
427 "+multi_lang", | |
428 #else | |
429 "-multi_lang", | |
430 #endif | |
14 | 431 #ifdef FEAT_MZSCHEME |
132 | 432 # ifdef DYNAMIC_MZSCHEME |
433 "+mzscheme/dyn", | |
434 # else | |
14 | 435 "+mzscheme", |
132 | 436 # endif |
14 | 437 #else |
438 "-mzscheme", | |
439 #endif | |
7 | 440 #ifdef FEAT_NETBEANS_INTG |
441 "+netbeans_intg", | |
442 #else | |
443 "-netbeans_intg", | |
444 #endif | |
445 #ifdef FEAT_GUI_W32 | |
446 # ifdef FEAT_OLE | |
447 "+ole", | |
448 # else | |
449 "-ole", | |
450 # endif | |
451 #endif | |
452 #ifdef FEAT_PATH_EXTRA | |
453 "+path_extra", | |
454 #else | |
455 "-path_extra", | |
456 #endif | |
457 #ifdef FEAT_PERL | |
458 # ifdef DYNAMIC_PERL | |
459 "+perl/dyn", | |
460 # else | |
461 "+perl", | |
462 # endif | |
463 #else | |
464 "-perl", | |
465 #endif | |
2214
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
466 #ifdef FEAT_PERSISTENT_UNDO |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
467 "+persistent_undo", |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
468 #else |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
469 "-persistent_undo", |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
470 #endif |
7 | 471 #ifdef FEAT_PRINTER |
472 # ifdef FEAT_POSTSCRIPT | |
473 "+postscript", | |
474 # else | |
475 "-postscript", | |
476 # endif | |
477 "+printer", | |
478 #else | |
479 "-printer", | |
480 #endif | |
170 | 481 #ifdef FEAT_PROFILE |
482 "+profile", | |
483 #else | |
484 "-profile", | |
485 #endif | |
7 | 486 #ifdef FEAT_PYTHON |
487 # ifdef DYNAMIC_PYTHON | |
488 "+python/dyn", | |
489 # else | |
490 "+python", | |
491 # endif | |
492 #else | |
493 "-python", | |
494 #endif | |
2329
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
495 #ifdef FEAT_PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
496 # ifdef DYNAMIC_PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
497 "+python3/dyn", |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
498 # else |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
499 "+python3", |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
500 # endif |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
501 #else |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
502 "-python3", |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
503 #endif |
7 | 504 #ifdef FEAT_QUICKFIX |
505 "+quickfix", | |
506 #else | |
507 "-quickfix", | |
508 #endif | |
857 | 509 #ifdef FEAT_RELTIME |
510 "+reltime", | |
511 #else | |
512 "-reltime", | |
513 #endif | |
7 | 514 #ifdef FEAT_RIGHTLEFT |
515 "+rightleft", | |
516 #else | |
517 "-rightleft", | |
518 #endif | |
519 #ifdef FEAT_RUBY | |
520 # ifdef DYNAMIC_RUBY | |
521 "+ruby/dyn", | |
522 # else | |
523 "+ruby", | |
524 # endif | |
525 #else | |
526 "-ruby", | |
527 #endif | |
528 #ifdef FEAT_SCROLLBIND | |
529 "+scrollbind", | |
530 #else | |
531 "-scrollbind", | |
532 #endif | |
533 #ifdef FEAT_SIGNS | |
534 "+signs", | |
535 #else | |
536 "-signs", | |
537 #endif | |
538 #ifdef FEAT_SMARTINDENT | |
539 "+smartindent", | |
540 #else | |
541 "-smartindent", | |
542 #endif | |
543 #ifdef FEAT_SNIFF | |
544 "+sniff", | |
545 #else | |
546 "-sniff", | |
547 #endif | |
1989 | 548 #ifdef STARTUPTIME |
549 "+startuptime", | |
550 #else | |
551 "-startuptime", | |
552 #endif | |
7 | 553 #ifdef FEAT_STL_OPT |
554 "+statusline", | |
555 #else | |
556 "-statusline", | |
557 #endif | |
558 #ifdef FEAT_SUN_WORKSHOP | |
559 "+sun_workshop", | |
560 #else | |
561 "-sun_workshop", | |
562 #endif | |
563 #ifdef FEAT_SYN_HL | |
564 "+syntax", | |
565 #else | |
566 "-syntax", | |
567 #endif | |
568 /* only interesting on Unix systems */ | |
569 #if defined(USE_SYSTEM) && (defined(UNIX) || defined(__EMX__)) | |
570 "+system()", | |
571 #endif | |
572 #ifdef FEAT_TAG_BINS | |
573 "+tag_binary", | |
574 #else | |
575 "-tag_binary", | |
576 #endif | |
577 #ifdef FEAT_TAG_OLDSTATIC | |
578 "+tag_old_static", | |
579 #else | |
580 "-tag_old_static", | |
581 #endif | |
582 #ifdef FEAT_TAG_ANYWHITE | |
583 "+tag_any_white", | |
584 #else | |
585 "-tag_any_white", | |
586 #endif | |
587 #ifdef FEAT_TCL | |
588 # ifdef DYNAMIC_TCL | |
589 "+tcl/dyn", | |
590 # else | |
591 "+tcl", | |
592 # endif | |
593 #else | |
594 "-tcl", | |
595 #endif | |
596 #if defined(UNIX) || defined(__EMX__) | |
597 /* only Unix (or OS/2 with EMX!) can have terminfo instead of termcap */ | |
598 # ifdef TERMINFO | |
599 "+terminfo", | |
600 # else | |
601 "-terminfo", | |
602 # endif | |
603 #else /* unix always includes termcap support */ | |
604 # ifdef HAVE_TGETENT | |
605 "+tgetent", | |
606 # else | |
607 "-tgetent", | |
608 # endif | |
609 #endif | |
610 #ifdef FEAT_TERMRESPONSE | |
611 "+termresponse", | |
612 #else | |
613 "-termresponse", | |
614 #endif | |
615 #ifdef FEAT_TEXTOBJ | |
616 "+textobjects", | |
617 #else | |
618 "-textobjects", | |
619 #endif | |
620 #ifdef FEAT_TITLE | |
621 "+title", | |
622 #else | |
623 "-title", | |
624 #endif | |
625 #ifdef FEAT_TOOLBAR | |
626 "+toolbar", | |
627 #else | |
628 "-toolbar", | |
629 #endif | |
630 #ifdef FEAT_USR_CMDS | |
631 "+user_commands", | |
632 #else | |
633 "-user_commands", | |
634 #endif | |
635 #ifdef FEAT_VERTSPLIT | |
636 "+vertsplit", | |
637 #else | |
638 "-vertsplit", | |
639 #endif | |
640 #ifdef FEAT_VIRTUALEDIT | |
641 "+virtualedit", | |
642 #else | |
643 "-virtualedit", | |
644 #endif | |
645 "+visual", | |
5735 | 646 #ifdef FEAT_VISUALEXTRA |
7 | 647 "+visualextra", |
5735 | 648 #else |
7 | 649 "-visualextra", |
650 #endif | |
651 #ifdef FEAT_VIMINFO | |
652 "+viminfo", | |
653 #else | |
654 "-viminfo", | |
655 #endif | |
656 #ifdef FEAT_VREPLACE | |
657 "+vreplace", | |
658 #else | |
659 "-vreplace", | |
660 #endif | |
661 #ifdef FEAT_WILDIGN | |
662 "+wildignore", | |
663 #else | |
664 "-wildignore", | |
665 #endif | |
666 #ifdef FEAT_WILDMENU | |
667 "+wildmenu", | |
668 #else | |
669 "-wildmenu", | |
670 #endif | |
671 #ifdef FEAT_WINDOWS | |
672 "+windows", | |
673 #else | |
674 "-windows", | |
675 #endif | |
676 #ifdef FEAT_WRITEBACKUP | |
677 "+writebackup", | |
678 #else | |
679 "-writebackup", | |
680 #endif | |
681 #if defined(UNIX) || defined(VMS) | |
682 # ifdef FEAT_X11 | |
683 "+X11", | |
684 # else | |
685 "-X11", | |
686 # endif | |
687 #endif | |
688 #ifdef FEAT_XFONTSET | |
689 "+xfontset", | |
690 #else | |
691 "-xfontset", | |
692 #endif | |
693 #ifdef FEAT_XIM | |
694 "+xim", | |
695 #else | |
696 "-xim", | |
697 #endif | |
698 #if defined(UNIX) || defined(VMS) | |
699 # ifdef USE_XSMP_INTERACT | |
700 "+xsmp_interact", | |
701 # else | |
702 # ifdef USE_XSMP | |
703 "+xsmp", | |
704 # else | |
705 "-xsmp", | |
706 # endif | |
707 # endif | |
708 # ifdef FEAT_XCLIPBOARD | |
709 "+xterm_clipboard", | |
710 # else | |
711 "-xterm_clipboard", | |
712 # endif | |
713 #endif | |
714 #ifdef FEAT_XTERM_SAVE | |
715 "+xterm_save", | |
716 #else | |
717 "-xterm_save", | |
718 #endif | |
719 #ifdef WIN3264 | |
720 # ifdef FEAT_XPM_W32 | |
721 "+xpm_w32", | |
722 # else | |
723 "-xpm_w32", | |
724 # endif | |
5316 | 725 #else |
726 # ifdef HAVE_XPM | |
727 "+xpm", | |
728 # else | |
729 "-xpm", | |
730 # endif | |
7 | 731 #endif |
732 NULL | |
733 }; | |
734 | |
735 static int included_patches[] = | |
736 { /* Add new patch number below this line */ | |
737 /**/ | |
6098 | 738 387, |
739 /**/ | |
6096 | 740 386, |
741 /**/ | |
6094 | 742 385, |
743 /**/ | |
6092 | 744 384, |
745 /**/ | |
6089 | 746 383, |
747 /**/ | |
6087 | 748 382, |
749 /**/ | |
6085 | 750 381, |
751 /**/ | |
6083 | 752 380, |
753 /**/ | |
6081 | 754 379, |
755 /**/ | |
6079 | 756 378, |
757 /**/ | |
6077 | 758 377, |
759 /**/ | |
6075 | 760 376, |
761 /**/ | |
6073 | 762 375, |
763 /**/ | |
6071 | 764 374, |
765 /**/ | |
6068 | 766 373, |
767 /**/ | |
6066 | 768 372, |
769 /**/ | |
6064 | 770 371, |
771 /**/ | |
6062 | 772 370, |
773 /**/ | |
6060 | 774 369, |
775 /**/ | |
6058 | 776 368, |
777 /**/ | |
6056 | 778 367, |
779 /**/ | |
6054 | 780 366, |
781 /**/ | |
6052 | 782 365, |
783 /**/ | |
6049 | 784 364, |
785 /**/ | |
6047 | 786 363, |
787 /**/ | |
6045 | 788 362, |
789 /**/ | |
6043 | 790 361, |
791 /**/ | |
6041 | 792 360, |
793 /**/ | |
6039 | 794 359, |
795 /**/ | |
6037 | 796 358, |
797 /**/ | |
6035 | 798 357, |
799 /**/ | |
6033 | 800 356, |
801 /**/ | |
6030 | 802 355, |
803 /**/ | |
6028 | 804 354, |
805 /**/ | |
6026 | 806 353, |
807 /**/ | |
6024 | 808 352, |
809 /**/ | |
6022 | 810 351, |
811 /**/ | |
6020 | 812 350, |
813 /**/ | |
6018 | 814 349, |
815 /**/ | |
6016 | 816 348, |
817 /**/ | |
6014 | 818 347, |
819 /**/ | |
6012 | 820 346, |
821 /**/ | |
6010 | 822 345, |
823 /**/ | |
6007 | 824 344, |
825 /**/ | |
6005 | 826 343, |
827 /**/ | |
6003 | 828 342, |
829 /**/ | |
6001 | 830 341, |
831 /**/ | |
5999 | 832 340, |
833 /**/ | |
5997 | 834 339, |
835 /**/ | |
5995 | 836 338, |
837 /**/ | |
5993 | 838 337, |
839 /**/ | |
5991 | 840 336, |
841 /**/ | |
5989 | 842 335, |
843 /**/ | |
5987 | 844 334, |
845 /**/ | |
5985 | 846 333, |
847 /**/ | |
5983 | 848 332, |
849 /**/ | |
5981 | 850 331, |
851 /**/ | |
5979 | 852 330, |
853 /**/ | |
5977 | 854 329, |
855 /**/ | |
5975 | 856 328, |
857 /**/ | |
5973 | 858 327, |
859 /**/ | |
5971 | 860 326, |
861 /**/ | |
5969 | 862 325, |
863 /**/ | |
5966 | 864 324, |
865 /**/ | |
5964 | 866 323, |
867 /**/ | |
5962 | 868 322, |
869 /**/ | |
5960 | 870 321, |
871 /**/ | |
5958 | 872 320, |
873 /**/ | |
5956 | 874 319, |
875 /**/ | |
5954 | 876 318, |
877 /**/ | |
5952 | 878 317, |
879 /**/ | |
5950 | 880 316, |
881 /**/ | |
5948 | 882 315, |
883 /**/ | |
5946 | 884 314, |
885 /**/ | |
5944 | 886 313, |
887 /**/ | |
5942 | 888 312, |
889 /**/ | |
5940 | 890 311, |
891 /**/ | |
5938 | 892 310, |
893 /**/ | |
5936 | 894 309, |
895 /**/ | |
5934 | 896 308, |
897 /**/ | |
5932 | 898 307, |
899 /**/ | |
5930 | 900 306, |
901 /**/ | |
5927 | 902 305, |
903 /**/ | |
5925 | 904 304, |
905 /**/ | |
5923 | 906 303, |
907 /**/ | |
5921 | 908 302, |
909 /**/ | |
5919 | 910 301, |
911 /**/ | |
5917 | 912 300, |
913 /**/ | |
5915 | 914 299, |
915 /**/ | |
5913 | 916 298, |
917 /**/ | |
5911 | 918 297, |
919 /**/ | |
5909 | 920 296, |
921 /**/ | |
5905 | 922 295, |
923 /**/ | |
5903 | 924 294, |
925 /**/ | |
5901 | 926 293, |
927 /**/ | |
5899 | 928 292, |
929 /**/ | |
5897 | 930 291, |
931 /**/ | |
5895 | 932 290, |
933 /**/ | |
5893 | 934 289, |
935 /**/ | |
5891 | 936 288, |
937 /**/ | |
5889 | 938 287, |
939 /**/ | |
5887 | 940 286, |
941 /**/ | |
5885 | 942 285, |
943 /**/ | |
5883 | 944 284, |
945 /**/ | |
5881 | 946 283, |
947 /**/ | |
5879 | 948 282, |
949 /**/ | |
5877 | 950 281, |
951 /**/ | |
5875 | 952 280, |
953 /**/ | |
5873 | 954 279, |
955 /**/ | |
5871 | 956 278, |
957 /**/ | |
5869 | 958 277, |
959 /**/ | |
5867 | 960 276, |
961 /**/ | |
5865 | 962 275, |
963 /**/ | |
5863 | 964 274, |
965 /**/ | |
5860 | 966 273, |
967 /**/ | |
5858 | 968 272, |
969 /**/ | |
5856 | 970 271, |
971 /**/ | |
5854 | 972 270, |
973 /**/ | |
5852 | 974 269, |
975 /**/ | |
5850 | 976 268, |
977 /**/ | |
5848 | 978 267, |
979 /**/ | |
5846 | 980 266, |
981 /**/ | |
5844 | 982 265, |
983 /**/ | |
5842 | 984 264, |
985 /**/ | |
5840 | 986 263, |
987 /**/ | |
5838 | 988 262, |
989 /**/ | |
5836 | 990 261, |
991 /**/ | |
5834 | 992 260, |
993 /**/ | |
5832 | 994 259, |
995 /**/ | |
5830 | 996 258, |
997 /**/ | |
5828 | 998 257, |
999 /**/ | |
5826 | 1000 256, |
1001 /**/ | |
5824 | 1002 255, |
1003 /**/ | |
5822 | 1004 254, |
1005 /**/ | |
5820 | 1006 253, |
1007 /**/ | |
5818 | 1008 252, |
1009 /**/ | |
5816 | 1010 251, |
1011 /**/ | |
5812 | 1012 250, |
1013 /**/ | |
5810 | 1014 249, |
1015 /**/ | |
5808 | 1016 248, |
1017 /**/ | |
5806 | 1018 247, |
1019 /**/ | |
5804 | 1020 246, |
1021 /**/ | |
5802 | 1022 245, |
1023 /**/ | |
5800 | 1024 244, |
1025 /**/ | |
5798 | 1026 243, |
1027 /**/ | |
5796 | 1028 242, |
1029 /**/ | |
5794 | 1030 241, |
1031 /**/ | |
5792 | 1032 240, |
1033 /**/ | |
5790 | 1034 239, |
1035 /**/ | |
5788 | 1036 238, |
1037 /**/ | |
5786 | 1038 237, |
1039 /**/ | |
5784 | 1040 236, |
1041 /**/ | |
5782 | 1042 235, |
1043 /**/ | |
5780 | 1044 234, |
1045 /**/ | |
5778 | 1046 233, |
1047 /**/ | |
5776 | 1048 232, |
1049 /**/ | |
5774 | 1050 231, |
1051 /**/ | |
5772 | 1052 230, |
1053 /**/ | |
5770 | 1054 229, |
1055 /**/ | |
5768 | 1056 228, |
1057 /**/ | |
5766 | 1058 227, |
1059 /**/ | |
5764 | 1060 226, |
1061 /**/ | |
5761 | 1062 225, |
1063 /**/ | |
5759 | 1064 224, |
1065 /**/ | |
5757 | 1066 223, |
1067 /**/ | |
5755 | 1068 222, |
1069 /**/ | |
5753 | 1070 221, |
1071 /**/ | |
5751 | 1072 220, |
1073 /**/ | |
5749 | 1074 219, |
1075 /**/ | |
5747 | 1076 218, |
1077 /**/ | |
5745 | 1078 217, |
1079 /**/ | |
5743 | 1080 216, |
1081 /**/ | |
5741 | 1082 215, |
1083 /**/ | |
5739 | 1084 214, |
1085 /**/ | |
5737 | 1086 213, |
1087 /**/ | |
5735 | 1088 212, |
1089 /**/ | |
5732 | 1090 211, |
1091 /**/ | |
5730 | 1092 210, |
1093 /**/ | |
5728 | 1094 209, |
1095 /**/ | |
5726 | 1096 208, |
1097 /**/ | |
5724 | 1098 207, |
1099 /**/ | |
5722 | 1100 206, |
1101 /**/ | |
5720 | 1102 205, |
1103 /**/ | |
5718 | 1104 204, |
1105 /**/ | |
5716 | 1106 203, |
1107 /**/ | |
5714 | 1108 202, |
1109 /**/ | |
5712 | 1110 201, |
1111 /**/ | |
5710 | 1112 200, |
1113 /**/ | |
5708 | 1114 199, |
1115 /**/ | |
5706 | 1116 198, |
1117 /**/ | |
5704 | 1118 197, |
1119 /**/ | |
5702 | 1120 196, |
1121 /**/ | |
5700 | 1122 195, |
1123 /**/ | |
5698 | 1124 194, |
1125 /**/ | |
5695 | 1126 193, |
1127 /**/ | |
5693 | 1128 192, |
1129 /**/ | |
5690 | 1130 191, |
1131 /**/ | |
5688 | 1132 190, |
1133 /**/ | |
5686 | 1134 189, |
1135 /**/ | |
5684 | 1136 188, |
1137 /**/ | |
5682 | 1138 187, |
1139 /**/ | |
5680 | 1140 186, |
1141 /**/ | |
5678 | 1142 185, |
1143 /**/ | |
5676 | 1144 184, |
1145 /**/ | |
5674 | 1146 183, |
1147 /**/ | |
5672 | 1148 182, |
1149 /**/ | |
5670 | 1150 181, |
1151 /**/ | |
5668 | 1152 180, |
1153 /**/ | |
5666 | 1154 179, |
1155 /**/ | |
5664 | 1156 178, |
1157 /**/ | |
5661 | 1158 177, |
1159 /**/ | |
5659 | 1160 176, |
1161 /**/ | |
5657 | 1162 175, |
1163 /**/ | |
5655 | 1164 174, |
1165 /**/ | |
5653 | 1166 173, |
1167 /**/ | |
5651 | 1168 172, |
1169 /**/ | |
5649 | 1170 171, |
1171 /**/ | |
5647 | 1172 170, |
1173 /**/ | |
5645 | 1174 169, |
1175 /**/ | |
5643 | 1176 168, |
1177 /**/ | |
5641 | 1178 167, |
1179 /**/ | |
5639 | 1180 166, |
1181 /**/ | |
5637 | 1182 165, |
1183 /**/ | |
5635 | 1184 164, |
1185 /**/ | |
5633 | 1186 163, |
1187 /**/ | |
5631 | 1188 162, |
1189 /**/ | |
5629 | 1190 161, |
1191 /**/ | |
5627 | 1192 160, |
1193 /**/ | |
5625 | 1194 159, |
1195 /**/ | |
5623 | 1196 158, |
1197 /**/ | |
5621 | 1198 157, |
1199 /**/ | |
5619 | 1200 156, |
1201 /**/ | |
5616 | 1202 155, |
1203 /**/ | |
5614 | 1204 154, |
1205 /**/ | |
5612 | 1206 153, |
1207 /**/ | |
5610 | 1208 152, |
1209 /**/ | |
5608 | 1210 151, |
1211 /**/ | |
5606 | 1212 150, |
1213 /**/ | |
5604 | 1214 149, |
1215 /**/ | |
5602 | 1216 148, |
1217 /**/ | |
5600 | 1218 147, |
1219 /**/ | |
5598 | 1220 146, |
1221 /**/ | |
5596 | 1222 145, |
1223 /**/ | |
5594 | 1224 144, |
1225 /**/ | |
5592 | 1226 143, |
1227 /**/ | |
5590 | 1228 142, |
1229 /**/ | |
5588 | 1230 141, |
1231 /**/ | |
5586 | 1232 140, |
1233 /**/ | |
5584 | 1234 139, |
1235 /**/ | |
5582 | 1236 138, |
1237 /**/ | |
5580 | 1238 137, |
1239 /**/ | |
5578 | 1240 136, |
1241 /**/ | |
5575 | 1242 135, |
1243 /**/ | |
5573 | 1244 134, |
1245 /**/ | |
5571 | 1246 133, |
1247 /**/ | |
5569 | 1248 132, |
1249 /**/ | |
5566 | 1250 131, |
1251 /**/ | |
5564 | 1252 130, |
1253 /**/ | |
5562 | 1254 129, |
1255 /**/ | |
5560 | 1256 128, |
1257 /**/ | |
5558 | 1258 127, |
1259 /**/ | |
5556 | 1260 126, |
1261 /**/ | |
5553 | 1262 125, |
1263 /**/ | |
5551 | 1264 124, |
1265 /**/ | |
5549 | 1266 123, |
1267 /**/ | |
5547 | 1268 122, |
1269 /**/ | |
5545 | 1270 121, |
1271 /**/ | |
5543 | 1272 120, |
1273 /**/ | |
5541 | 1274 119, |
1275 /**/ | |
5539 | 1276 118, |
1277 /**/ | |
5537 | 1278 117, |
1279 /**/ | |
5535 | 1280 116, |
1281 /**/ | |
5533 | 1282 115, |
1283 /**/ | |
5531 | 1284 114, |
1285 /**/ | |
5529 | 1286 113, |
1287 /**/ | |
5527 | 1288 112, |
1289 /**/ | |
5525 | 1290 111, |
1291 /**/ | |
5523 | 1292 110, |
1293 /**/ | |
5521 | 1294 109, |
1295 /**/ | |
5519 | 1296 108, |
1297 /**/ | |
5517 | 1298 107, |
1299 /**/ | |
5515 | 1300 106, |
1301 /**/ | |
5513 | 1302 105, |
1303 /**/ | |
5511 | 1304 104, |
1305 /**/ | |
5508 | 1306 103, |
1307 /**/ | |
5506 | 1308 102, |
1309 /**/ | |
5504 | 1310 101, |
1311 /**/ | |
5502 | 1312 100, |
1313 /**/ | |
5500 | 1314 99, |
1315 /**/ | |
5498 | 1316 98, |
1317 /**/ | |
5496 | 1318 97, |
1319 /**/ | |
5494 | 1320 96, |
1321 /**/ | |
5492 | 1322 95, |
1323 /**/ | |
5490 | 1324 94, |
1325 /**/ | |
5488 | 1326 93, |
1327 /**/ | |
5485 | 1328 92, |
1329 /**/ | |
5483 | 1330 91, |
1331 /**/ | |
5481 | 1332 90, |
1333 /**/ | |
5479 | 1334 89, |
1335 /**/ | |
5477 | 1336 88, |
1337 /**/ | |
5475 | 1338 87, |
1339 /**/ | |
5473 | 1340 86, |
1341 /**/ | |
5471 | 1342 85, |
1343 /**/ | |
5469 | 1344 84, |
1345 /**/ | |
5467 | 1346 83, |
1347 /**/ | |
5464 | 1348 82, |
1349 /**/ | |
5462 | 1350 81, |
1351 /**/ | |
5460 | 1352 80, |
1353 /**/ | |
5458 | 1354 79, |
1355 /**/ | |
5456 | 1356 78, |
1357 /**/ | |
5454 | 1358 77, |
1359 /**/ | |
5452 | 1360 76, |
1361 /**/ | |
5450 | 1362 75, |
1363 /**/ | |
5448 | 1364 74, |
1365 /**/ | |
5446 | 1366 73, |
1367 /**/ | |
5444 | 1368 72, |
1369 /**/ | |
5442 | 1370 71, |
1371 /**/ | |
5440 | 1372 70, |
1373 /**/ | |
5438 | 1374 69, |
1375 /**/ | |
5436 | 1376 68, |
1377 /**/ | |
5434 | 1378 67, |
1379 /**/ | |
5432 | 1380 66, |
1381 /**/ | |
5430 | 1382 65, |
1383 /**/ | |
5428 | 1384 64, |
1385 /**/ | |
5426 | 1386 63, |
1387 /**/ | |
5423 | 1388 62, |
1389 /**/ | |
5421 | 1390 61, |
1391 /**/ | |
5419 | 1392 60, |
1393 /**/ | |
5417 | 1394 59, |
1395 /**/ | |
5415 | 1396 58, |
1397 /**/ | |
5413 | 1398 57, |
1399 /**/ | |
5411 | 1400 56, |
1401 /**/ | |
5409 | 1402 55, |
1403 /**/ | |
5407 | 1404 54, |
1405 /**/ | |
5405 | 1406 53, |
1407 /**/ | |
5403 | 1408 52, |
1409 /**/ | |
5401 | 1410 51, |
1411 /**/ | |
5398 | 1412 50, |
1413 /**/ | |
5396 | 1414 49, |
1415 /**/ | |
5394 | 1416 48, |
1417 /**/ | |
5392 | 1418 47, |
1419 /**/ | |
5390 | 1420 46, |
1421 /**/ | |
5388 | 1422 45, |
1423 /**/ | |
5386 | 1424 44, |
1425 /**/ | |
5384 | 1426 43, |
1427 /**/ | |
5382 | 1428 42, |
1429 /**/ | |
5380 | 1430 41, |
1431 /**/ | |
5378 | 1432 40, |
1433 /**/ | |
5376 | 1434 39, |
1435 /**/ | |
5374 | 1436 38, |
1437 /**/ | |
5372 | 1438 37, |
1439 /**/ | |
5370 | 1440 36, |
1441 /**/ | |
5367 | 1442 35, |
1443 /**/ | |
5365 | 1444 34, |
1445 /**/ | |
5363 | 1446 33, |
1447 /**/ | |
5360 | 1448 32, |
1449 /**/ | |
5358 | 1450 31, |
1451 /**/ | |
5356 | 1452 30, |
1453 /**/ | |
5353 | 1454 29, |
1455 /**/ | |
5351 | 1456 28, |
1457 /**/ | |
5349 | 1458 27, |
1459 /**/ | |
5347 | 1460 26, |
1461 /**/ | |
5345 | 1462 25, |
1463 /**/ | |
5343 | 1464 24, |
1465 /**/ | |
5341 | 1466 23, |
1467 /**/ | |
5338 | 1468 22, |
1469 /**/ | |
5336 | 1470 21, |
1471 /**/ | |
5334 | 1472 20, |
1473 /**/ | |
5332 | 1474 19, |
1475 /**/ | |
5330 | 1476 18, |
1477 /**/ | |
5328 | 1478 17, |
1479 /**/ | |
5326 | 1480 16, |
1481 /**/ | |
5324 | 1482 15, |
1483 /**/ | |
5322 | 1484 14, |
1485 /**/ | |
5320 | 1486 13, |
1487 /**/ | |
5318 | 1488 12, |
1489 /**/ | |
5316 | 1490 11, |
1491 /**/ | |
5314 | 1492 10, |
1493 /**/ | |
5312 | 1494 9, |
1495 /**/ | |
5310 | 1496 8, |
1497 /**/ | |
5308 | 1498 7, |
1499 /**/ | |
5306 | 1500 6, |
1501 /**/ | |
5304 | 1502 5, |
1503 /**/ | |
5302 | 1504 4, |
1505 /**/ | |
5300 | 1506 3, |
1507 /**/ | |
5298 | 1508 2, |
1509 /**/ | |
5296 | 1510 1, |
1511 /**/ | |
7 | 1512 0 |
1513 }; | |
1514 | |
1760 | 1515 /* |
1516 * Place to put a short description when adding a feature with a patch. | |
1517 * Keep it short, e.g.,: "relative numbers", "persistent undo". | |
1518 * Also add a comment marker to separate the lines. | |
1519 * See the official Vim patches for the diff format: It must use a context of | |
1777 | 1520 * one line only. Create it by hand or use "diff -C2" and edit the patch. |
1760 | 1521 */ |
1522 static char *(extra_patches[]) = | |
1523 { /* Add your patch description below this line */ | |
1524 /**/ | |
1525 NULL | |
1526 }; | |
1527 | |
7 | 1528 int |
1529 highest_patch() | |
1530 { | |
1531 int i; | |
1532 int h = 0; | |
1533 | |
1534 for (i = 0; included_patches[i] != 0; ++i) | |
1535 if (included_patches[i] > h) | |
1536 h = included_patches[i]; | |
1537 return h; | |
1538 } | |
1539 | |
1540 #if defined(FEAT_EVAL) || defined(PROTO) | |
1541 /* | |
1542 * Return TRUE if patch "n" has been included. | |
1543 */ | |
1544 int | |
1545 has_patch(n) | |
1546 int n; | |
1547 { | |
1548 int i; | |
1549 | |
1550 for (i = 0; included_patches[i] != 0; ++i) | |
1551 if (included_patches[i] == n) | |
1552 return TRUE; | |
1553 return FALSE; | |
1554 } | |
1555 #endif | |
1556 | |
1557 void | |
1558 ex_version(eap) | |
1559 exarg_T *eap; | |
1560 { | |
1561 /* | |
1562 * Ignore a ":version 9.99" command. | |
1563 */ | |
1564 if (*eap->arg == NUL) | |
1565 { | |
1566 msg_putchar('\n'); | |
1567 list_version(); | |
1568 } | |
1569 } | |
1570 | |
4147 | 1571 /* |
1572 * List all features aligned in columns, dictionary style. | |
1573 */ | |
1574 static void | |
1575 list_features() | |
1576 { | |
1577 int i; | |
1578 int ncol; | |
1579 int nrow; | |
1580 int nfeat = 0; | |
1581 int width = 0; | |
1582 | |
1583 /* Find the length of the longest feature name, use that + 1 as the column | |
1584 * width */ | |
1585 for (i = 0; features[i] != NULL; ++i) | |
1586 { | |
4160 | 1587 int l = (int)STRLEN(features[i]); |
4147 | 1588 |
1589 if (l > width) | |
1590 width = l; | |
1591 ++nfeat; | |
1592 } | |
1593 width += 1; | |
1594 | |
1595 if (Columns < width) | |
1596 { | |
1597 /* Not enough screen columns - show one per line */ | |
1598 for (i = 0; features[i] != NULL; ++i) | |
1599 { | |
1600 version_msg(features[i]); | |
1601 if (msg_col > 0) | |
1602 msg_putchar('\n'); | |
1603 } | |
1604 return; | |
1605 } | |
1606 | |
1607 /* The rightmost column doesn't need a separator. | |
1608 * Sacrifice it to fit in one more column if possible. */ | |
4170 | 1609 ncol = (int) (Columns + 1) / width; |
4147 | 1610 nrow = nfeat / ncol + (nfeat % ncol ? 1 : 0); |
1611 | |
4170 | 1612 /* i counts columns then rows. idx counts rows then columns. */ |
4147 | 1613 for (i = 0; !got_int && i < nrow * ncol; ++i) |
1614 { | |
1615 int idx = (i / ncol) + (i % ncol) * nrow; | |
1616 | |
1617 if (idx < nfeat) | |
1618 { | |
1619 int last_col = (i + 1) % ncol == 0; | |
1620 | |
1621 msg_puts((char_u *)features[idx]); | |
1622 if (last_col) | |
1623 { | |
1624 if (msg_col > 0) | |
1625 msg_putchar('\n'); | |
1626 } | |
1627 else | |
1628 { | |
1629 while (msg_col % width) | |
1630 msg_putchar(' '); | |
1631 } | |
1632 } | |
1633 else | |
4170 | 1634 { |
1635 if (msg_col > 0) | |
1636 msg_putchar('\n'); | |
1637 } | |
4147 | 1638 } |
1639 } | |
4160 | 1640 |
7 | 1641 void |
1642 list_version() | |
1643 { | |
1644 int i; | |
1645 int first; | |
1646 char *s = ""; | |
1647 | |
1648 /* | |
1649 * When adding features here, don't forget to update the list of | |
1650 * internal variables in eval.c! | |
1651 */ | |
1652 MSG(longVersion); | |
1653 #ifdef WIN3264 | |
1654 # ifdef FEAT_GUI_W32 | |
1655 # if defined(_MSC_VER) && (_MSC_VER <= 1010) | |
1656 /* Only MS VC 4.1 and earlier can do Win32s */ | |
1607 | 1657 MSG_PUTS(_("\nMS-Windows 16/32-bit GUI version")); |
7 | 1658 # else |
990 | 1659 # ifdef _WIN64 |
1607 | 1660 MSG_PUTS(_("\nMS-Windows 64-bit GUI version")); |
990 | 1661 # else |
1607 | 1662 MSG_PUTS(_("\nMS-Windows 32-bit GUI version")); |
990 | 1663 # endif |
7 | 1664 # endif |
1665 if (gui_is_win32s()) | |
1666 MSG_PUTS(_(" in Win32s mode")); | |
1667 # ifdef FEAT_OLE | |
1668 MSG_PUTS(_(" with OLE support")); | |
1669 # endif | |
1670 # else | |
1607 | 1671 # ifdef _WIN64 |
1672 MSG_PUTS(_("\nMS-Windows 64-bit console version")); | |
1673 # else | |
1674 MSG_PUTS(_("\nMS-Windows 32-bit console version")); | |
1675 # endif | |
7 | 1676 # endif |
1677 #endif | |
1678 #ifdef WIN16 | |
1607 | 1679 MSG_PUTS(_("\nMS-Windows 16-bit version")); |
7 | 1680 #endif |
1681 #ifdef MSDOS | |
1682 # ifdef DJGPP | |
1607 | 1683 MSG_PUTS(_("\n32-bit MS-DOS version")); |
7 | 1684 # else |
1607 | 1685 MSG_PUTS(_("\n16-bit MS-DOS version")); |
7 | 1686 # endif |
1687 #endif | |
1688 #ifdef MACOS | |
1689 # ifdef MACOS_X | |
1690 # ifdef MACOS_X_UNIX | |
1691 MSG_PUTS(_("\nMacOS X (unix) version")); | |
1692 # else | |
1693 MSG_PUTS(_("\nMacOS X version")); | |
1694 # endif | |
1695 #else | |
1696 MSG_PUTS(_("\nMacOS version")); | |
1697 # endif | |
1698 #endif | |
1699 | |
1700 #ifdef VMS | |
1705 | 1701 MSG_PUTS(_("\nOpenVMS version")); |
1045 | 1702 # ifdef HAVE_PATHDEF |
1703 if (*compiled_arch != NUL) | |
1704 { | |
1705 MSG_PUTS(" - "); | |
1706 MSG_PUTS(compiled_arch); | |
1707 } | |
1708 # endif | |
1709 | |
7 | 1710 #endif |
1711 | |
1712 /* Print the list of patch numbers if there is at least one. */ | |
1713 /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */ | |
1714 if (included_patches[0] != 0) | |
1715 { | |
1716 MSG_PUTS(_("\nIncluded patches: ")); | |
1717 first = -1; | |
1718 /* find last one */ | |
1719 for (i = 0; included_patches[i] != 0; ++i) | |
1720 ; | |
1721 while (--i >= 0) | |
1722 { | |
1723 if (first < 0) | |
1724 first = included_patches[i]; | |
1725 if (i == 0 || included_patches[i - 1] != included_patches[i] + 1) | |
1726 { | |
1727 MSG_PUTS(s); | |
1728 s = ", "; | |
1729 msg_outnum((long)first); | |
1730 if (first != included_patches[i]) | |
1731 { | |
1732 MSG_PUTS("-"); | |
1733 msg_outnum((long)included_patches[i]); | |
1734 } | |
1735 first = -1; | |
1736 } | |
1737 } | |
1738 } | |
1739 | |
1760 | 1740 /* Print the list of extra patch descriptions if there is at least one. */ |
1741 if (extra_patches[0] != NULL) | |
1742 { | |
1743 MSG_PUTS(_("\nExtra patches: ")); | |
1744 s = ""; | |
1745 for (i = 0; extra_patches[i] != NULL; ++i) | |
1746 { | |
1747 MSG_PUTS(s); | |
1748 s = ", "; | |
1749 MSG_PUTS(extra_patches[i]); | |
1750 } | |
1751 } | |
1752 | |
7 | 1753 #ifdef MODIFIED_BY |
1754 MSG_PUTS("\n"); | |
1755 MSG_PUTS(_("Modified by ")); | |
1756 MSG_PUTS(MODIFIED_BY); | |
1757 #endif | |
1758 | |
1759 #ifdef HAVE_PATHDEF | |
1760 if (*compiled_user != NUL || *compiled_sys != NUL) | |
1761 { | |
1762 MSG_PUTS(_("\nCompiled ")); | |
1763 if (*compiled_user != NUL) | |
1764 { | |
1765 MSG_PUTS(_("by ")); | |
1766 MSG_PUTS(compiled_user); | |
1767 } | |
1768 if (*compiled_sys != NUL) | |
1769 { | |
1770 MSG_PUTS("@"); | |
1771 MSG_PUTS(compiled_sys); | |
1772 } | |
1773 } | |
1774 #endif | |
1775 | |
1776 #ifdef FEAT_HUGE | |
1777 MSG_PUTS(_("\nHuge version ")); | |
1778 #else | |
1779 # ifdef FEAT_BIG | |
1780 MSG_PUTS(_("\nBig version ")); | |
1781 # else | |
1782 # ifdef FEAT_NORMAL | |
1783 MSG_PUTS(_("\nNormal version ")); | |
1784 # else | |
1785 # ifdef FEAT_SMALL | |
1786 MSG_PUTS(_("\nSmall version ")); | |
1787 # else | |
1788 MSG_PUTS(_("\nTiny version ")); | |
1789 # endif | |
1790 # endif | |
1791 # endif | |
1792 #endif | |
1793 #ifndef FEAT_GUI | |
1794 MSG_PUTS(_("without GUI.")); | |
1795 #else | |
1796 # ifdef FEAT_GUI_GTK | |
1797 # ifdef FEAT_GUI_GNOME | |
1798 MSG_PUTS(_("with GTK2-GNOME GUI.")); | |
1799 # else | |
1800 MSG_PUTS(_("with GTK2 GUI.")); | |
1801 # endif | |
1802 # else | |
1803 # ifdef FEAT_GUI_MOTIF | |
1804 MSG_PUTS(_("with X11-Motif GUI.")); | |
1805 # else | |
1806 # ifdef FEAT_GUI_ATHENA | |
1807 # ifdef FEAT_GUI_NEXTAW | |
1808 MSG_PUTS(_("with X11-neXtaw GUI.")); | |
1809 # else | |
1810 MSG_PUTS(_("with X11-Athena GUI.")); | |
1811 # endif | |
1812 # else | |
1813 # ifdef FEAT_GUI_PHOTON | |
1814 MSG_PUTS(_("with Photon GUI.")); | |
1815 # else | |
1816 # if defined(MSWIN) | |
1817 MSG_PUTS(_("with GUI.")); | |
1818 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1819 # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON |
7 | 1820 MSG_PUTS(_("with Carbon GUI.")); |
1821 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1822 # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX |
7 | 1823 MSG_PUTS(_("with Cocoa GUI.")); |
1824 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1825 # if defined(MACOS) |
7 | 1826 MSG_PUTS(_("with (classic) GUI.")); |
1827 # endif | |
1828 # endif | |
1829 # endif | |
1830 # endif | |
1831 # endif | |
1832 # endif | |
1833 # endif | |
1834 # endif | |
1835 #endif | |
1836 version_msg(_(" Features included (+) or not (-):\n")); | |
1837 | |
4147 | 1838 list_features(); |
7 | 1839 |
1840 #ifdef SYS_VIMRC_FILE | |
1841 version_msg(_(" system vimrc file: \"")); | |
1842 version_msg(SYS_VIMRC_FILE); | |
1843 version_msg("\"\n"); | |
1844 #endif | |
1845 #ifdef USR_VIMRC_FILE | |
1846 version_msg(_(" user vimrc file: \"")); | |
1847 version_msg(USR_VIMRC_FILE); | |
1848 version_msg("\"\n"); | |
1849 #endif | |
1850 #ifdef USR_VIMRC_FILE2 | |
1851 version_msg(_(" 2nd user vimrc file: \"")); | |
1852 version_msg(USR_VIMRC_FILE2); | |
1853 version_msg("\"\n"); | |
1854 #endif | |
1855 #ifdef USR_VIMRC_FILE3 | |
1856 version_msg(_(" 3rd user vimrc file: \"")); | |
1857 version_msg(USR_VIMRC_FILE3); | |
1858 version_msg("\"\n"); | |
1859 #endif | |
1860 #ifdef USR_EXRC_FILE | |
1861 version_msg(_(" user exrc file: \"")); | |
1862 version_msg(USR_EXRC_FILE); | |
1863 version_msg("\"\n"); | |
1864 #endif | |
1865 #ifdef USR_EXRC_FILE2 | |
1866 version_msg(_(" 2nd user exrc file: \"")); | |
1867 version_msg(USR_EXRC_FILE2); | |
1868 version_msg("\"\n"); | |
1869 #endif | |
1870 #ifdef FEAT_GUI | |
1871 # ifdef SYS_GVIMRC_FILE | |
1872 version_msg(_(" system gvimrc file: \"")); | |
1873 version_msg(SYS_GVIMRC_FILE); | |
1874 version_msg("\"\n"); | |
1875 # endif | |
1876 version_msg(_(" user gvimrc file: \"")); | |
1877 version_msg(USR_GVIMRC_FILE); | |
1878 version_msg("\"\n"); | |
1879 # ifdef USR_GVIMRC_FILE2 | |
1880 version_msg(_("2nd user gvimrc file: \"")); | |
1881 version_msg(USR_GVIMRC_FILE2); | |
1882 version_msg("\"\n"); | |
1883 # endif | |
1884 # ifdef USR_GVIMRC_FILE3 | |
1885 version_msg(_("3rd user gvimrc file: \"")); | |
1886 version_msg(USR_GVIMRC_FILE3); | |
1887 version_msg("\"\n"); | |
1888 # endif | |
1889 #endif | |
1890 #ifdef FEAT_GUI | |
1891 # ifdef SYS_MENU_FILE | |
1892 version_msg(_(" system menu file: \"")); | |
1893 version_msg(SYS_MENU_FILE); | |
1894 version_msg("\"\n"); | |
1895 # endif | |
1896 #endif | |
1897 #ifdef HAVE_PATHDEF | |
1898 if (*default_vim_dir != NUL) | |
1899 { | |
1900 version_msg(_(" fall-back for $VIM: \"")); | |
1901 version_msg((char *)default_vim_dir); | |
1902 version_msg("\"\n"); | |
1903 } | |
1904 if (*default_vimruntime_dir != NUL) | |
1905 { | |
1906 version_msg(_(" f-b for $VIMRUNTIME: \"")); | |
1907 version_msg((char *)default_vimruntime_dir); | |
1908 version_msg("\"\n"); | |
1909 } | |
1910 version_msg(_("Compilation: ")); | |
1911 version_msg((char *)all_cflags); | |
1912 version_msg("\n"); | |
1913 #ifdef VMS | |
1914 if (*compiler_version != NUL) | |
1915 { | |
1916 version_msg(_("Compiler: ")); | |
1917 version_msg((char *)compiler_version); | |
1918 version_msg("\n"); | |
1919 } | |
1920 #endif | |
1921 version_msg(_("Linking: ")); | |
1922 version_msg((char *)all_lflags); | |
1923 #endif | |
1924 #ifdef DEBUG | |
1925 version_msg("\n"); | |
1926 version_msg(_(" DEBUG BUILD")); | |
1927 #endif | |
1928 } | |
1929 | |
1930 /* | |
1931 * Output a string for the version message. If it's going to wrap, output a | |
1932 * newline, unless the message is too long to fit on the screen anyway. | |
1933 */ | |
1934 static void | |
1935 version_msg(s) | |
1936 char *s; | |
1937 { | |
1938 int len = (int)STRLEN(s); | |
1939 | |
1940 if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns | |
1941 && *s != '\n') | |
1942 msg_putchar('\n'); | |
1943 if (!got_int) | |
1944 MSG_PUTS(s); | |
1945 } | |
1946 | |
1947 static void do_intro_line __ARGS((int row, char_u *mesg, int add_version, int attr)); | |
1948 | |
1949 /* | |
5126
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1950 * Show the intro message when not editing a file. |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1951 */ |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1952 void |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1953 maybe_intro_message() |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1954 { |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1955 if (bufempty() |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1956 && curbuf->b_fname == NULL |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1957 #ifdef FEAT_WINDOWS |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1958 && firstwin->w_next == NULL |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1959 #endif |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1960 && vim_strchr(p_shm, SHM_INTRO) == NULL) |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1961 intro_message(FALSE); |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1962 } |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1963 |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1964 /* |
7 | 1965 * Give an introductory message about Vim. |
1966 * Only used when starting Vim on an empty file, without a file name. | |
1967 * Or with the ":intro" command (for Sven :-). | |
1968 */ | |
1969 void | |
1970 intro_message(colon) | |
1971 int colon; /* TRUE for ":intro" */ | |
1972 { | |
1973 int i; | |
1974 int row; | |
1975 int blanklines; | |
1976 int sponsor; | |
1977 char *p; | |
1978 static char *(lines[]) = | |
1979 { | |
1980 N_("VIM - Vi IMproved"), | |
1981 "", | |
1982 N_("version "), | |
1983 N_("by Bram Moolenaar et al."), | |
1984 #ifdef MODIFIED_BY | |
1985 " ", | |
1986 #endif | |
1987 N_("Vim is open source and freely distributable"), | |
1988 "", | |
1989 N_("Help poor children in Uganda!"), | |
1990 N_("type :help iccf<Enter> for information "), | |
1991 "", | |
1992 N_("type :q<Enter> to exit "), | |
1993 N_("type :help<Enter> or <F1> for on-line help"), | |
26 | 1994 N_("type :help version7<Enter> for version info"), |
7 | 1995 NULL, |
1996 "", | |
1997 N_("Running in Vi compatible mode"), | |
1998 N_("type :set nocp<Enter> for Vim defaults"), | |
1999 N_("type :help cp-default<Enter> for info on this"), | |
2000 }; | |
2001 #ifdef FEAT_GUI | |
2002 static char *(gui_lines[]) = | |
2003 { | |
2004 NULL, | |
2005 NULL, | |
2006 NULL, | |
2007 NULL, | |
2008 #ifdef MODIFIED_BY | |
2009 NULL, | |
2010 #endif | |
2011 NULL, | |
2012 NULL, | |
2013 NULL, | |
2014 N_("menu Help->Orphans for information "), | |
2015 NULL, | |
2016 N_("Running modeless, typed text is inserted"), | |
2017 N_("menu Edit->Global Settings->Toggle Insert Mode "), | |
2018 N_(" for two modes "), | |
2019 NULL, | |
2020 NULL, | |
2021 NULL, | |
2022 N_("menu Edit->Global Settings->Toggle Vi Compatible"), | |
2023 N_(" for Vim defaults "), | |
2024 }; | |
2025 #endif | |
2026 | |
2027 /* blanklines = screen height - # message lines */ | |
2028 blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1); | |
2029 if (!p_cp) | |
2030 blanklines += 4; /* add 4 for not showing "Vi compatible" message */ | |
2031 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
2032 if (mch_windows95()) | |
2033 blanklines -= 3; /* subtract 3 for showing "Windows 95" message */ | |
2034 #endif | |
2035 | |
2036 #ifdef FEAT_WINDOWS | |
2037 /* Don't overwrite a statusline. Depends on 'cmdheight'. */ | |
2038 if (p_ls > 1) | |
2039 blanklines -= Rows - topframe->fr_height; | |
2040 #endif | |
2041 if (blanklines < 0) | |
2042 blanklines = 0; | |
2043 | |
2044 /* Show the sponsor and register message one out of four times, the Uganda | |
2045 * message two out of four times. */ | |
615 | 2046 sponsor = (int)time(NULL); |
7 | 2047 sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0); |
2048 | |
2049 /* start displaying the message lines after half of the blank lines */ | |
2050 row = blanklines / 2; | |
2051 if ((row >= 2 && Columns >= 50) || colon) | |
2052 { | |
2053 for (i = 0; i < (int)(sizeof(lines) / sizeof(char *)); ++i) | |
2054 { | |
2055 p = lines[i]; | |
2056 #ifdef FEAT_GUI | |
2057 if (p_im && gui.in_use && gui_lines[i] != NULL) | |
2058 p = gui_lines[i]; | |
2059 #endif | |
2060 if (p == NULL) | |
2061 { | |
2062 if (!p_cp) | |
2063 break; | |
2064 continue; | |
2065 } | |
2066 if (sponsor != 0) | |
2067 { | |
2068 if (strstr(p, "children") != NULL) | |
2069 p = sponsor < 0 | |
2070 ? N_("Sponsor Vim development!") | |
2071 : N_("Become a registered Vim user!"); | |
2072 else if (strstr(p, "iccf") != NULL) | |
2073 p = sponsor < 0 | |
2074 ? N_("type :help sponsor<Enter> for information ") | |
2075 : N_("type :help register<Enter> for information "); | |
2076 else if (strstr(p, "Orphans") != NULL) | |
2077 p = N_("menu Help->Sponsor/Register for information "); | |
2078 } | |
2079 if (*p != NUL) | |
2080 do_intro_line(row, (char_u *)_(p), i == 2, 0); | |
2081 ++row; | |
2082 } | |
2083 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
2084 if (mch_windows95()) | |
2085 { | |
2086 do_intro_line(++row, | |
2087 (char_u *)_("WARNING: Windows 95/98/ME detected"), | |
2088 FALSE, hl_attr(HLF_E)); | |
2089 do_intro_line(++row, | |
2090 (char_u *)_("type :help windows95<Enter> for info on this"), | |
2091 FALSE, 0); | |
2092 } | |
2093 #endif | |
2094 } | |
2095 | |
2096 /* Make the wait-return message appear just below the text. */ | |
2097 if (colon) | |
2098 msg_row = row; | |
2099 } | |
2100 | |
2101 static void | |
2102 do_intro_line(row, mesg, add_version, attr) | |
2103 int row; | |
2104 char_u *mesg; | |
2105 int add_version; | |
2106 int attr; | |
2107 { | |
2108 char_u vers[20]; | |
2109 int col; | |
2110 char_u *p; | |
2111 int l; | |
2112 int clen; | |
2113 #ifdef MODIFIED_BY | |
2114 # define MODBY_LEN 150 | |
2115 char_u modby[MODBY_LEN]; | |
2116 | |
2117 if (*mesg == ' ') | |
2118 { | |
1491 | 2119 vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1); |
7 | 2120 l = STRLEN(modby); |
1491 | 2121 vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1); |
7 | 2122 mesg = modby; |
2123 } | |
2124 #endif | |
2125 | |
2126 /* Center the message horizontally. */ | |
2127 col = vim_strsize(mesg); | |
2128 if (add_version) | |
2129 { | |
2130 STRCPY(vers, mediumVersion); | |
2131 if (highest_patch()) | |
2132 { | |
2133 /* Check for 9.9x or 9.9xx, alpha/beta version */ | |
2619 | 2134 if (isalpha((int)vers[3])) |
7 | 2135 { |
3396 | 2136 int len = (isalpha((int)vers[4])) ? 5 : 4; |
2137 sprintf((char *)vers + len, ".%d%s", highest_patch(), | |
2138 mediumVersion + len); | |
7 | 2139 } |
2140 else | |
2141 sprintf((char *)vers + 3, ".%d", highest_patch()); | |
2142 } | |
2143 col += (int)STRLEN(vers); | |
2144 } | |
2145 col = (Columns - col) / 2; | |
2146 if (col < 0) | |
2147 col = 0; | |
2148 | |
2149 /* Split up in parts to highlight <> items differently. */ | |
2150 for (p = mesg; *p != NUL; p += l) | |
2151 { | |
2152 clen = 0; | |
2153 for (l = 0; p[l] != NUL | |
2154 && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l) | |
2155 { | |
2156 #ifdef FEAT_MBYTE | |
2157 if (has_mbyte) | |
2158 { | |
2159 clen += ptr2cells(p + l); | |
474 | 2160 l += (*mb_ptr2len)(p + l) - 1; |
7 | 2161 } |
2162 else | |
2163 #endif | |
2164 clen += byte2cells(p[l]); | |
2165 } | |
2166 screen_puts_len(p, l, row, col, *p == '<' ? hl_attr(HLF_8) : attr); | |
2167 col += clen; | |
2168 } | |
2169 | |
2170 /* Add the version number to the version line. */ | |
2171 if (add_version) | |
2172 screen_puts(vers, row, col, 0); | |
2173 } | |
2174 | |
2175 /* | |
2176 * ":intro": clear screen, display intro screen and wait for return. | |
2177 */ | |
2178 void | |
2179 ex_intro(eap) | |
1876 | 2180 exarg_T *eap UNUSED; |
7 | 2181 { |
2182 screenclear(); | |
2183 intro_message(TRUE); | |
2184 wait_return(TRUE); | |
2185 } |