Mercurial > vim
annotate src/version.c @ 6056:bdbe2037066d v7.4.367
updated for version 7.4.367
Problem: Other solution for redrawing after completion.
Solution: Schedule a window redraw instead of just clearing the command
line. (Jacob Niehus)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 16 Jul 2014 14:42:46 +0200 |
parents | ad775b587065 |
children | 021e16be3c02 |
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 /**/ | |
6056 | 738 367, |
739 /**/ | |
6054 | 740 366, |
741 /**/ | |
6052 | 742 365, |
743 /**/ | |
6049 | 744 364, |
745 /**/ | |
6047 | 746 363, |
747 /**/ | |
6045 | 748 362, |
749 /**/ | |
6043 | 750 361, |
751 /**/ | |
6041 | 752 360, |
753 /**/ | |
6039 | 754 359, |
755 /**/ | |
6037 | 756 358, |
757 /**/ | |
6035 | 758 357, |
759 /**/ | |
6033 | 760 356, |
761 /**/ | |
6030 | 762 355, |
763 /**/ | |
6028 | 764 354, |
765 /**/ | |
6026 | 766 353, |
767 /**/ | |
6024 | 768 352, |
769 /**/ | |
6022 | 770 351, |
771 /**/ | |
6020 | 772 350, |
773 /**/ | |
6018 | 774 349, |
775 /**/ | |
6016 | 776 348, |
777 /**/ | |
6014 | 778 347, |
779 /**/ | |
6012 | 780 346, |
781 /**/ | |
6010 | 782 345, |
783 /**/ | |
6007 | 784 344, |
785 /**/ | |
6005 | 786 343, |
787 /**/ | |
6003 | 788 342, |
789 /**/ | |
6001 | 790 341, |
791 /**/ | |
5999 | 792 340, |
793 /**/ | |
5997 | 794 339, |
795 /**/ | |
5995 | 796 338, |
797 /**/ | |
5993 | 798 337, |
799 /**/ | |
5991 | 800 336, |
801 /**/ | |
5989 | 802 335, |
803 /**/ | |
5987 | 804 334, |
805 /**/ | |
5985 | 806 333, |
807 /**/ | |
5983 | 808 332, |
809 /**/ | |
5981 | 810 331, |
811 /**/ | |
5979 | 812 330, |
813 /**/ | |
5977 | 814 329, |
815 /**/ | |
5975 | 816 328, |
817 /**/ | |
5973 | 818 327, |
819 /**/ | |
5971 | 820 326, |
821 /**/ | |
5969 | 822 325, |
823 /**/ | |
5966 | 824 324, |
825 /**/ | |
5964 | 826 323, |
827 /**/ | |
5962 | 828 322, |
829 /**/ | |
5960 | 830 321, |
831 /**/ | |
5958 | 832 320, |
833 /**/ | |
5956 | 834 319, |
835 /**/ | |
5954 | 836 318, |
837 /**/ | |
5952 | 838 317, |
839 /**/ | |
5950 | 840 316, |
841 /**/ | |
5948 | 842 315, |
843 /**/ | |
5946 | 844 314, |
845 /**/ | |
5944 | 846 313, |
847 /**/ | |
5942 | 848 312, |
849 /**/ | |
5940 | 850 311, |
851 /**/ | |
5938 | 852 310, |
853 /**/ | |
5936 | 854 309, |
855 /**/ | |
5934 | 856 308, |
857 /**/ | |
5932 | 858 307, |
859 /**/ | |
5930 | 860 306, |
861 /**/ | |
5927 | 862 305, |
863 /**/ | |
5925 | 864 304, |
865 /**/ | |
5923 | 866 303, |
867 /**/ | |
5921 | 868 302, |
869 /**/ | |
5919 | 870 301, |
871 /**/ | |
5917 | 872 300, |
873 /**/ | |
5915 | 874 299, |
875 /**/ | |
5913 | 876 298, |
877 /**/ | |
5911 | 878 297, |
879 /**/ | |
5909 | 880 296, |
881 /**/ | |
5905 | 882 295, |
883 /**/ | |
5903 | 884 294, |
885 /**/ | |
5901 | 886 293, |
887 /**/ | |
5899 | 888 292, |
889 /**/ | |
5897 | 890 291, |
891 /**/ | |
5895 | 892 290, |
893 /**/ | |
5893 | 894 289, |
895 /**/ | |
5891 | 896 288, |
897 /**/ | |
5889 | 898 287, |
899 /**/ | |
5887 | 900 286, |
901 /**/ | |
5885 | 902 285, |
903 /**/ | |
5883 | 904 284, |
905 /**/ | |
5881 | 906 283, |
907 /**/ | |
5879 | 908 282, |
909 /**/ | |
5877 | 910 281, |
911 /**/ | |
5875 | 912 280, |
913 /**/ | |
5873 | 914 279, |
915 /**/ | |
5871 | 916 278, |
917 /**/ | |
5869 | 918 277, |
919 /**/ | |
5867 | 920 276, |
921 /**/ | |
5865 | 922 275, |
923 /**/ | |
5863 | 924 274, |
925 /**/ | |
5860 | 926 273, |
927 /**/ | |
5858 | 928 272, |
929 /**/ | |
5856 | 930 271, |
931 /**/ | |
5854 | 932 270, |
933 /**/ | |
5852 | 934 269, |
935 /**/ | |
5850 | 936 268, |
937 /**/ | |
5848 | 938 267, |
939 /**/ | |
5846 | 940 266, |
941 /**/ | |
5844 | 942 265, |
943 /**/ | |
5842 | 944 264, |
945 /**/ | |
5840 | 946 263, |
947 /**/ | |
5838 | 948 262, |
949 /**/ | |
5836 | 950 261, |
951 /**/ | |
5834 | 952 260, |
953 /**/ | |
5832 | 954 259, |
955 /**/ | |
5830 | 956 258, |
957 /**/ | |
5828 | 958 257, |
959 /**/ | |
5826 | 960 256, |
961 /**/ | |
5824 | 962 255, |
963 /**/ | |
5822 | 964 254, |
965 /**/ | |
5820 | 966 253, |
967 /**/ | |
5818 | 968 252, |
969 /**/ | |
5816 | 970 251, |
971 /**/ | |
5812 | 972 250, |
973 /**/ | |
5810 | 974 249, |
975 /**/ | |
5808 | 976 248, |
977 /**/ | |
5806 | 978 247, |
979 /**/ | |
5804 | 980 246, |
981 /**/ | |
5802 | 982 245, |
983 /**/ | |
5800 | 984 244, |
985 /**/ | |
5798 | 986 243, |
987 /**/ | |
5796 | 988 242, |
989 /**/ | |
5794 | 990 241, |
991 /**/ | |
5792 | 992 240, |
993 /**/ | |
5790 | 994 239, |
995 /**/ | |
5788 | 996 238, |
997 /**/ | |
5786 | 998 237, |
999 /**/ | |
5784 | 1000 236, |
1001 /**/ | |
5782 | 1002 235, |
1003 /**/ | |
5780 | 1004 234, |
1005 /**/ | |
5778 | 1006 233, |
1007 /**/ | |
5776 | 1008 232, |
1009 /**/ | |
5774 | 1010 231, |
1011 /**/ | |
5772 | 1012 230, |
1013 /**/ | |
5770 | 1014 229, |
1015 /**/ | |
5768 | 1016 228, |
1017 /**/ | |
5766 | 1018 227, |
1019 /**/ | |
5764 | 1020 226, |
1021 /**/ | |
5761 | 1022 225, |
1023 /**/ | |
5759 | 1024 224, |
1025 /**/ | |
5757 | 1026 223, |
1027 /**/ | |
5755 | 1028 222, |
1029 /**/ | |
5753 | 1030 221, |
1031 /**/ | |
5751 | 1032 220, |
1033 /**/ | |
5749 | 1034 219, |
1035 /**/ | |
5747 | 1036 218, |
1037 /**/ | |
5745 | 1038 217, |
1039 /**/ | |
5743 | 1040 216, |
1041 /**/ | |
5741 | 1042 215, |
1043 /**/ | |
5739 | 1044 214, |
1045 /**/ | |
5737 | 1046 213, |
1047 /**/ | |
5735 | 1048 212, |
1049 /**/ | |
5732 | 1050 211, |
1051 /**/ | |
5730 | 1052 210, |
1053 /**/ | |
5728 | 1054 209, |
1055 /**/ | |
5726 | 1056 208, |
1057 /**/ | |
5724 | 1058 207, |
1059 /**/ | |
5722 | 1060 206, |
1061 /**/ | |
5720 | 1062 205, |
1063 /**/ | |
5718 | 1064 204, |
1065 /**/ | |
5716 | 1066 203, |
1067 /**/ | |
5714 | 1068 202, |
1069 /**/ | |
5712 | 1070 201, |
1071 /**/ | |
5710 | 1072 200, |
1073 /**/ | |
5708 | 1074 199, |
1075 /**/ | |
5706 | 1076 198, |
1077 /**/ | |
5704 | 1078 197, |
1079 /**/ | |
5702 | 1080 196, |
1081 /**/ | |
5700 | 1082 195, |
1083 /**/ | |
5698 | 1084 194, |
1085 /**/ | |
5695 | 1086 193, |
1087 /**/ | |
5693 | 1088 192, |
1089 /**/ | |
5690 | 1090 191, |
1091 /**/ | |
5688 | 1092 190, |
1093 /**/ | |
5686 | 1094 189, |
1095 /**/ | |
5684 | 1096 188, |
1097 /**/ | |
5682 | 1098 187, |
1099 /**/ | |
5680 | 1100 186, |
1101 /**/ | |
5678 | 1102 185, |
1103 /**/ | |
5676 | 1104 184, |
1105 /**/ | |
5674 | 1106 183, |
1107 /**/ | |
5672 | 1108 182, |
1109 /**/ | |
5670 | 1110 181, |
1111 /**/ | |
5668 | 1112 180, |
1113 /**/ | |
5666 | 1114 179, |
1115 /**/ | |
5664 | 1116 178, |
1117 /**/ | |
5661 | 1118 177, |
1119 /**/ | |
5659 | 1120 176, |
1121 /**/ | |
5657 | 1122 175, |
1123 /**/ | |
5655 | 1124 174, |
1125 /**/ | |
5653 | 1126 173, |
1127 /**/ | |
5651 | 1128 172, |
1129 /**/ | |
5649 | 1130 171, |
1131 /**/ | |
5647 | 1132 170, |
1133 /**/ | |
5645 | 1134 169, |
1135 /**/ | |
5643 | 1136 168, |
1137 /**/ | |
5641 | 1138 167, |
1139 /**/ | |
5639 | 1140 166, |
1141 /**/ | |
5637 | 1142 165, |
1143 /**/ | |
5635 | 1144 164, |
1145 /**/ | |
5633 | 1146 163, |
1147 /**/ | |
5631 | 1148 162, |
1149 /**/ | |
5629 | 1150 161, |
1151 /**/ | |
5627 | 1152 160, |
1153 /**/ | |
5625 | 1154 159, |
1155 /**/ | |
5623 | 1156 158, |
1157 /**/ | |
5621 | 1158 157, |
1159 /**/ | |
5619 | 1160 156, |
1161 /**/ | |
5616 | 1162 155, |
1163 /**/ | |
5614 | 1164 154, |
1165 /**/ | |
5612 | 1166 153, |
1167 /**/ | |
5610 | 1168 152, |
1169 /**/ | |
5608 | 1170 151, |
1171 /**/ | |
5606 | 1172 150, |
1173 /**/ | |
5604 | 1174 149, |
1175 /**/ | |
5602 | 1176 148, |
1177 /**/ | |
5600 | 1178 147, |
1179 /**/ | |
5598 | 1180 146, |
1181 /**/ | |
5596 | 1182 145, |
1183 /**/ | |
5594 | 1184 144, |
1185 /**/ | |
5592 | 1186 143, |
1187 /**/ | |
5590 | 1188 142, |
1189 /**/ | |
5588 | 1190 141, |
1191 /**/ | |
5586 | 1192 140, |
1193 /**/ | |
5584 | 1194 139, |
1195 /**/ | |
5582 | 1196 138, |
1197 /**/ | |
5580 | 1198 137, |
1199 /**/ | |
5578 | 1200 136, |
1201 /**/ | |
5575 | 1202 135, |
1203 /**/ | |
5573 | 1204 134, |
1205 /**/ | |
5571 | 1206 133, |
1207 /**/ | |
5569 | 1208 132, |
1209 /**/ | |
5566 | 1210 131, |
1211 /**/ | |
5564 | 1212 130, |
1213 /**/ | |
5562 | 1214 129, |
1215 /**/ | |
5560 | 1216 128, |
1217 /**/ | |
5558 | 1218 127, |
1219 /**/ | |
5556 | 1220 126, |
1221 /**/ | |
5553 | 1222 125, |
1223 /**/ | |
5551 | 1224 124, |
1225 /**/ | |
5549 | 1226 123, |
1227 /**/ | |
5547 | 1228 122, |
1229 /**/ | |
5545 | 1230 121, |
1231 /**/ | |
5543 | 1232 120, |
1233 /**/ | |
5541 | 1234 119, |
1235 /**/ | |
5539 | 1236 118, |
1237 /**/ | |
5537 | 1238 117, |
1239 /**/ | |
5535 | 1240 116, |
1241 /**/ | |
5533 | 1242 115, |
1243 /**/ | |
5531 | 1244 114, |
1245 /**/ | |
5529 | 1246 113, |
1247 /**/ | |
5527 | 1248 112, |
1249 /**/ | |
5525 | 1250 111, |
1251 /**/ | |
5523 | 1252 110, |
1253 /**/ | |
5521 | 1254 109, |
1255 /**/ | |
5519 | 1256 108, |
1257 /**/ | |
5517 | 1258 107, |
1259 /**/ | |
5515 | 1260 106, |
1261 /**/ | |
5513 | 1262 105, |
1263 /**/ | |
5511 | 1264 104, |
1265 /**/ | |
5508 | 1266 103, |
1267 /**/ | |
5506 | 1268 102, |
1269 /**/ | |
5504 | 1270 101, |
1271 /**/ | |
5502 | 1272 100, |
1273 /**/ | |
5500 | 1274 99, |
1275 /**/ | |
5498 | 1276 98, |
1277 /**/ | |
5496 | 1278 97, |
1279 /**/ | |
5494 | 1280 96, |
1281 /**/ | |
5492 | 1282 95, |
1283 /**/ | |
5490 | 1284 94, |
1285 /**/ | |
5488 | 1286 93, |
1287 /**/ | |
5485 | 1288 92, |
1289 /**/ | |
5483 | 1290 91, |
1291 /**/ | |
5481 | 1292 90, |
1293 /**/ | |
5479 | 1294 89, |
1295 /**/ | |
5477 | 1296 88, |
1297 /**/ | |
5475 | 1298 87, |
1299 /**/ | |
5473 | 1300 86, |
1301 /**/ | |
5471 | 1302 85, |
1303 /**/ | |
5469 | 1304 84, |
1305 /**/ | |
5467 | 1306 83, |
1307 /**/ | |
5464 | 1308 82, |
1309 /**/ | |
5462 | 1310 81, |
1311 /**/ | |
5460 | 1312 80, |
1313 /**/ | |
5458 | 1314 79, |
1315 /**/ | |
5456 | 1316 78, |
1317 /**/ | |
5454 | 1318 77, |
1319 /**/ | |
5452 | 1320 76, |
1321 /**/ | |
5450 | 1322 75, |
1323 /**/ | |
5448 | 1324 74, |
1325 /**/ | |
5446 | 1326 73, |
1327 /**/ | |
5444 | 1328 72, |
1329 /**/ | |
5442 | 1330 71, |
1331 /**/ | |
5440 | 1332 70, |
1333 /**/ | |
5438 | 1334 69, |
1335 /**/ | |
5436 | 1336 68, |
1337 /**/ | |
5434 | 1338 67, |
1339 /**/ | |
5432 | 1340 66, |
1341 /**/ | |
5430 | 1342 65, |
1343 /**/ | |
5428 | 1344 64, |
1345 /**/ | |
5426 | 1346 63, |
1347 /**/ | |
5423 | 1348 62, |
1349 /**/ | |
5421 | 1350 61, |
1351 /**/ | |
5419 | 1352 60, |
1353 /**/ | |
5417 | 1354 59, |
1355 /**/ | |
5415 | 1356 58, |
1357 /**/ | |
5413 | 1358 57, |
1359 /**/ | |
5411 | 1360 56, |
1361 /**/ | |
5409 | 1362 55, |
1363 /**/ | |
5407 | 1364 54, |
1365 /**/ | |
5405 | 1366 53, |
1367 /**/ | |
5403 | 1368 52, |
1369 /**/ | |
5401 | 1370 51, |
1371 /**/ | |
5398 | 1372 50, |
1373 /**/ | |
5396 | 1374 49, |
1375 /**/ | |
5394 | 1376 48, |
1377 /**/ | |
5392 | 1378 47, |
1379 /**/ | |
5390 | 1380 46, |
1381 /**/ | |
5388 | 1382 45, |
1383 /**/ | |
5386 | 1384 44, |
1385 /**/ | |
5384 | 1386 43, |
1387 /**/ | |
5382 | 1388 42, |
1389 /**/ | |
5380 | 1390 41, |
1391 /**/ | |
5378 | 1392 40, |
1393 /**/ | |
5376 | 1394 39, |
1395 /**/ | |
5374 | 1396 38, |
1397 /**/ | |
5372 | 1398 37, |
1399 /**/ | |
5370 | 1400 36, |
1401 /**/ | |
5367 | 1402 35, |
1403 /**/ | |
5365 | 1404 34, |
1405 /**/ | |
5363 | 1406 33, |
1407 /**/ | |
5360 | 1408 32, |
1409 /**/ | |
5358 | 1410 31, |
1411 /**/ | |
5356 | 1412 30, |
1413 /**/ | |
5353 | 1414 29, |
1415 /**/ | |
5351 | 1416 28, |
1417 /**/ | |
5349 | 1418 27, |
1419 /**/ | |
5347 | 1420 26, |
1421 /**/ | |
5345 | 1422 25, |
1423 /**/ | |
5343 | 1424 24, |
1425 /**/ | |
5341 | 1426 23, |
1427 /**/ | |
5338 | 1428 22, |
1429 /**/ | |
5336 | 1430 21, |
1431 /**/ | |
5334 | 1432 20, |
1433 /**/ | |
5332 | 1434 19, |
1435 /**/ | |
5330 | 1436 18, |
1437 /**/ | |
5328 | 1438 17, |
1439 /**/ | |
5326 | 1440 16, |
1441 /**/ | |
5324 | 1442 15, |
1443 /**/ | |
5322 | 1444 14, |
1445 /**/ | |
5320 | 1446 13, |
1447 /**/ | |
5318 | 1448 12, |
1449 /**/ | |
5316 | 1450 11, |
1451 /**/ | |
5314 | 1452 10, |
1453 /**/ | |
5312 | 1454 9, |
1455 /**/ | |
5310 | 1456 8, |
1457 /**/ | |
5308 | 1458 7, |
1459 /**/ | |
5306 | 1460 6, |
1461 /**/ | |
5304 | 1462 5, |
1463 /**/ | |
5302 | 1464 4, |
1465 /**/ | |
5300 | 1466 3, |
1467 /**/ | |
5298 | 1468 2, |
1469 /**/ | |
5296 | 1470 1, |
1471 /**/ | |
7 | 1472 0 |
1473 }; | |
1474 | |
1760 | 1475 /* |
1476 * Place to put a short description when adding a feature with a patch. | |
1477 * Keep it short, e.g.,: "relative numbers", "persistent undo". | |
1478 * Also add a comment marker to separate the lines. | |
1479 * See the official Vim patches for the diff format: It must use a context of | |
1777 | 1480 * one line only. Create it by hand or use "diff -C2" and edit the patch. |
1760 | 1481 */ |
1482 static char *(extra_patches[]) = | |
1483 { /* Add your patch description below this line */ | |
1484 /**/ | |
1485 NULL | |
1486 }; | |
1487 | |
7 | 1488 int |
1489 highest_patch() | |
1490 { | |
1491 int i; | |
1492 int h = 0; | |
1493 | |
1494 for (i = 0; included_patches[i] != 0; ++i) | |
1495 if (included_patches[i] > h) | |
1496 h = included_patches[i]; | |
1497 return h; | |
1498 } | |
1499 | |
1500 #if defined(FEAT_EVAL) || defined(PROTO) | |
1501 /* | |
1502 * Return TRUE if patch "n" has been included. | |
1503 */ | |
1504 int | |
1505 has_patch(n) | |
1506 int n; | |
1507 { | |
1508 int i; | |
1509 | |
1510 for (i = 0; included_patches[i] != 0; ++i) | |
1511 if (included_patches[i] == n) | |
1512 return TRUE; | |
1513 return FALSE; | |
1514 } | |
1515 #endif | |
1516 | |
1517 void | |
1518 ex_version(eap) | |
1519 exarg_T *eap; | |
1520 { | |
1521 /* | |
1522 * Ignore a ":version 9.99" command. | |
1523 */ | |
1524 if (*eap->arg == NUL) | |
1525 { | |
1526 msg_putchar('\n'); | |
1527 list_version(); | |
1528 } | |
1529 } | |
1530 | |
4147 | 1531 /* |
1532 * List all features aligned in columns, dictionary style. | |
1533 */ | |
1534 static void | |
1535 list_features() | |
1536 { | |
1537 int i; | |
1538 int ncol; | |
1539 int nrow; | |
1540 int nfeat = 0; | |
1541 int width = 0; | |
1542 | |
1543 /* Find the length of the longest feature name, use that + 1 as the column | |
1544 * width */ | |
1545 for (i = 0; features[i] != NULL; ++i) | |
1546 { | |
4160 | 1547 int l = (int)STRLEN(features[i]); |
4147 | 1548 |
1549 if (l > width) | |
1550 width = l; | |
1551 ++nfeat; | |
1552 } | |
1553 width += 1; | |
1554 | |
1555 if (Columns < width) | |
1556 { | |
1557 /* Not enough screen columns - show one per line */ | |
1558 for (i = 0; features[i] != NULL; ++i) | |
1559 { | |
1560 version_msg(features[i]); | |
1561 if (msg_col > 0) | |
1562 msg_putchar('\n'); | |
1563 } | |
1564 return; | |
1565 } | |
1566 | |
1567 /* The rightmost column doesn't need a separator. | |
1568 * Sacrifice it to fit in one more column if possible. */ | |
4170 | 1569 ncol = (int) (Columns + 1) / width; |
4147 | 1570 nrow = nfeat / ncol + (nfeat % ncol ? 1 : 0); |
1571 | |
4170 | 1572 /* i counts columns then rows. idx counts rows then columns. */ |
4147 | 1573 for (i = 0; !got_int && i < nrow * ncol; ++i) |
1574 { | |
1575 int idx = (i / ncol) + (i % ncol) * nrow; | |
1576 | |
1577 if (idx < nfeat) | |
1578 { | |
1579 int last_col = (i + 1) % ncol == 0; | |
1580 | |
1581 msg_puts((char_u *)features[idx]); | |
1582 if (last_col) | |
1583 { | |
1584 if (msg_col > 0) | |
1585 msg_putchar('\n'); | |
1586 } | |
1587 else | |
1588 { | |
1589 while (msg_col % width) | |
1590 msg_putchar(' '); | |
1591 } | |
1592 } | |
1593 else | |
4170 | 1594 { |
1595 if (msg_col > 0) | |
1596 msg_putchar('\n'); | |
1597 } | |
4147 | 1598 } |
1599 } | |
4160 | 1600 |
7 | 1601 void |
1602 list_version() | |
1603 { | |
1604 int i; | |
1605 int first; | |
1606 char *s = ""; | |
1607 | |
1608 /* | |
1609 * When adding features here, don't forget to update the list of | |
1610 * internal variables in eval.c! | |
1611 */ | |
1612 MSG(longVersion); | |
1613 #ifdef WIN3264 | |
1614 # ifdef FEAT_GUI_W32 | |
1615 # if defined(_MSC_VER) && (_MSC_VER <= 1010) | |
1616 /* Only MS VC 4.1 and earlier can do Win32s */ | |
1607 | 1617 MSG_PUTS(_("\nMS-Windows 16/32-bit GUI version")); |
7 | 1618 # else |
990 | 1619 # ifdef _WIN64 |
1607 | 1620 MSG_PUTS(_("\nMS-Windows 64-bit GUI version")); |
990 | 1621 # else |
1607 | 1622 MSG_PUTS(_("\nMS-Windows 32-bit GUI version")); |
990 | 1623 # endif |
7 | 1624 # endif |
1625 if (gui_is_win32s()) | |
1626 MSG_PUTS(_(" in Win32s mode")); | |
1627 # ifdef FEAT_OLE | |
1628 MSG_PUTS(_(" with OLE support")); | |
1629 # endif | |
1630 # else | |
1607 | 1631 # ifdef _WIN64 |
1632 MSG_PUTS(_("\nMS-Windows 64-bit console version")); | |
1633 # else | |
1634 MSG_PUTS(_("\nMS-Windows 32-bit console version")); | |
1635 # endif | |
7 | 1636 # endif |
1637 #endif | |
1638 #ifdef WIN16 | |
1607 | 1639 MSG_PUTS(_("\nMS-Windows 16-bit version")); |
7 | 1640 #endif |
1641 #ifdef MSDOS | |
1642 # ifdef DJGPP | |
1607 | 1643 MSG_PUTS(_("\n32-bit MS-DOS version")); |
7 | 1644 # else |
1607 | 1645 MSG_PUTS(_("\n16-bit MS-DOS version")); |
7 | 1646 # endif |
1647 #endif | |
1648 #ifdef MACOS | |
1649 # ifdef MACOS_X | |
1650 # ifdef MACOS_X_UNIX | |
1651 MSG_PUTS(_("\nMacOS X (unix) version")); | |
1652 # else | |
1653 MSG_PUTS(_("\nMacOS X version")); | |
1654 # endif | |
1655 #else | |
1656 MSG_PUTS(_("\nMacOS version")); | |
1657 # endif | |
1658 #endif | |
1659 | |
1660 #ifdef VMS | |
1705 | 1661 MSG_PUTS(_("\nOpenVMS version")); |
1045 | 1662 # ifdef HAVE_PATHDEF |
1663 if (*compiled_arch != NUL) | |
1664 { | |
1665 MSG_PUTS(" - "); | |
1666 MSG_PUTS(compiled_arch); | |
1667 } | |
1668 # endif | |
1669 | |
7 | 1670 #endif |
1671 | |
1672 /* Print the list of patch numbers if there is at least one. */ | |
1673 /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */ | |
1674 if (included_patches[0] != 0) | |
1675 { | |
1676 MSG_PUTS(_("\nIncluded patches: ")); | |
1677 first = -1; | |
1678 /* find last one */ | |
1679 for (i = 0; included_patches[i] != 0; ++i) | |
1680 ; | |
1681 while (--i >= 0) | |
1682 { | |
1683 if (first < 0) | |
1684 first = included_patches[i]; | |
1685 if (i == 0 || included_patches[i - 1] != included_patches[i] + 1) | |
1686 { | |
1687 MSG_PUTS(s); | |
1688 s = ", "; | |
1689 msg_outnum((long)first); | |
1690 if (first != included_patches[i]) | |
1691 { | |
1692 MSG_PUTS("-"); | |
1693 msg_outnum((long)included_patches[i]); | |
1694 } | |
1695 first = -1; | |
1696 } | |
1697 } | |
1698 } | |
1699 | |
1760 | 1700 /* Print the list of extra patch descriptions if there is at least one. */ |
1701 if (extra_patches[0] != NULL) | |
1702 { | |
1703 MSG_PUTS(_("\nExtra patches: ")); | |
1704 s = ""; | |
1705 for (i = 0; extra_patches[i] != NULL; ++i) | |
1706 { | |
1707 MSG_PUTS(s); | |
1708 s = ", "; | |
1709 MSG_PUTS(extra_patches[i]); | |
1710 } | |
1711 } | |
1712 | |
7 | 1713 #ifdef MODIFIED_BY |
1714 MSG_PUTS("\n"); | |
1715 MSG_PUTS(_("Modified by ")); | |
1716 MSG_PUTS(MODIFIED_BY); | |
1717 #endif | |
1718 | |
1719 #ifdef HAVE_PATHDEF | |
1720 if (*compiled_user != NUL || *compiled_sys != NUL) | |
1721 { | |
1722 MSG_PUTS(_("\nCompiled ")); | |
1723 if (*compiled_user != NUL) | |
1724 { | |
1725 MSG_PUTS(_("by ")); | |
1726 MSG_PUTS(compiled_user); | |
1727 } | |
1728 if (*compiled_sys != NUL) | |
1729 { | |
1730 MSG_PUTS("@"); | |
1731 MSG_PUTS(compiled_sys); | |
1732 } | |
1733 } | |
1734 #endif | |
1735 | |
1736 #ifdef FEAT_HUGE | |
1737 MSG_PUTS(_("\nHuge version ")); | |
1738 #else | |
1739 # ifdef FEAT_BIG | |
1740 MSG_PUTS(_("\nBig version ")); | |
1741 # else | |
1742 # ifdef FEAT_NORMAL | |
1743 MSG_PUTS(_("\nNormal version ")); | |
1744 # else | |
1745 # ifdef FEAT_SMALL | |
1746 MSG_PUTS(_("\nSmall version ")); | |
1747 # else | |
1748 MSG_PUTS(_("\nTiny version ")); | |
1749 # endif | |
1750 # endif | |
1751 # endif | |
1752 #endif | |
1753 #ifndef FEAT_GUI | |
1754 MSG_PUTS(_("without GUI.")); | |
1755 #else | |
1756 # ifdef FEAT_GUI_GTK | |
1757 # ifdef FEAT_GUI_GNOME | |
1758 MSG_PUTS(_("with GTK2-GNOME GUI.")); | |
1759 # else | |
1760 MSG_PUTS(_("with GTK2 GUI.")); | |
1761 # endif | |
1762 # else | |
1763 # ifdef FEAT_GUI_MOTIF | |
1764 MSG_PUTS(_("with X11-Motif GUI.")); | |
1765 # else | |
1766 # ifdef FEAT_GUI_ATHENA | |
1767 # ifdef FEAT_GUI_NEXTAW | |
1768 MSG_PUTS(_("with X11-neXtaw GUI.")); | |
1769 # else | |
1770 MSG_PUTS(_("with X11-Athena GUI.")); | |
1771 # endif | |
1772 # else | |
1773 # ifdef FEAT_GUI_PHOTON | |
1774 MSG_PUTS(_("with Photon GUI.")); | |
1775 # else | |
1776 # if defined(MSWIN) | |
1777 MSG_PUTS(_("with GUI.")); | |
1778 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1779 # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON |
7 | 1780 MSG_PUTS(_("with Carbon GUI.")); |
1781 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1782 # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX |
7 | 1783 MSG_PUTS(_("with Cocoa GUI.")); |
1784 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1785 # if defined(MACOS) |
7 | 1786 MSG_PUTS(_("with (classic) GUI.")); |
1787 # endif | |
1788 # endif | |
1789 # endif | |
1790 # endif | |
1791 # endif | |
1792 # endif | |
1793 # endif | |
1794 # endif | |
1795 #endif | |
1796 version_msg(_(" Features included (+) or not (-):\n")); | |
1797 | |
4147 | 1798 list_features(); |
7 | 1799 |
1800 #ifdef SYS_VIMRC_FILE | |
1801 version_msg(_(" system vimrc file: \"")); | |
1802 version_msg(SYS_VIMRC_FILE); | |
1803 version_msg("\"\n"); | |
1804 #endif | |
1805 #ifdef USR_VIMRC_FILE | |
1806 version_msg(_(" user vimrc file: \"")); | |
1807 version_msg(USR_VIMRC_FILE); | |
1808 version_msg("\"\n"); | |
1809 #endif | |
1810 #ifdef USR_VIMRC_FILE2 | |
1811 version_msg(_(" 2nd user vimrc file: \"")); | |
1812 version_msg(USR_VIMRC_FILE2); | |
1813 version_msg("\"\n"); | |
1814 #endif | |
1815 #ifdef USR_VIMRC_FILE3 | |
1816 version_msg(_(" 3rd user vimrc file: \"")); | |
1817 version_msg(USR_VIMRC_FILE3); | |
1818 version_msg("\"\n"); | |
1819 #endif | |
1820 #ifdef USR_EXRC_FILE | |
1821 version_msg(_(" user exrc file: \"")); | |
1822 version_msg(USR_EXRC_FILE); | |
1823 version_msg("\"\n"); | |
1824 #endif | |
1825 #ifdef USR_EXRC_FILE2 | |
1826 version_msg(_(" 2nd user exrc file: \"")); | |
1827 version_msg(USR_EXRC_FILE2); | |
1828 version_msg("\"\n"); | |
1829 #endif | |
1830 #ifdef FEAT_GUI | |
1831 # ifdef SYS_GVIMRC_FILE | |
1832 version_msg(_(" system gvimrc file: \"")); | |
1833 version_msg(SYS_GVIMRC_FILE); | |
1834 version_msg("\"\n"); | |
1835 # endif | |
1836 version_msg(_(" user gvimrc file: \"")); | |
1837 version_msg(USR_GVIMRC_FILE); | |
1838 version_msg("\"\n"); | |
1839 # ifdef USR_GVIMRC_FILE2 | |
1840 version_msg(_("2nd user gvimrc file: \"")); | |
1841 version_msg(USR_GVIMRC_FILE2); | |
1842 version_msg("\"\n"); | |
1843 # endif | |
1844 # ifdef USR_GVIMRC_FILE3 | |
1845 version_msg(_("3rd user gvimrc file: \"")); | |
1846 version_msg(USR_GVIMRC_FILE3); | |
1847 version_msg("\"\n"); | |
1848 # endif | |
1849 #endif | |
1850 #ifdef FEAT_GUI | |
1851 # ifdef SYS_MENU_FILE | |
1852 version_msg(_(" system menu file: \"")); | |
1853 version_msg(SYS_MENU_FILE); | |
1854 version_msg("\"\n"); | |
1855 # endif | |
1856 #endif | |
1857 #ifdef HAVE_PATHDEF | |
1858 if (*default_vim_dir != NUL) | |
1859 { | |
1860 version_msg(_(" fall-back for $VIM: \"")); | |
1861 version_msg((char *)default_vim_dir); | |
1862 version_msg("\"\n"); | |
1863 } | |
1864 if (*default_vimruntime_dir != NUL) | |
1865 { | |
1866 version_msg(_(" f-b for $VIMRUNTIME: \"")); | |
1867 version_msg((char *)default_vimruntime_dir); | |
1868 version_msg("\"\n"); | |
1869 } | |
1870 version_msg(_("Compilation: ")); | |
1871 version_msg((char *)all_cflags); | |
1872 version_msg("\n"); | |
1873 #ifdef VMS | |
1874 if (*compiler_version != NUL) | |
1875 { | |
1876 version_msg(_("Compiler: ")); | |
1877 version_msg((char *)compiler_version); | |
1878 version_msg("\n"); | |
1879 } | |
1880 #endif | |
1881 version_msg(_("Linking: ")); | |
1882 version_msg((char *)all_lflags); | |
1883 #endif | |
1884 #ifdef DEBUG | |
1885 version_msg("\n"); | |
1886 version_msg(_(" DEBUG BUILD")); | |
1887 #endif | |
1888 } | |
1889 | |
1890 /* | |
1891 * Output a string for the version message. If it's going to wrap, output a | |
1892 * newline, unless the message is too long to fit on the screen anyway. | |
1893 */ | |
1894 static void | |
1895 version_msg(s) | |
1896 char *s; | |
1897 { | |
1898 int len = (int)STRLEN(s); | |
1899 | |
1900 if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns | |
1901 && *s != '\n') | |
1902 msg_putchar('\n'); | |
1903 if (!got_int) | |
1904 MSG_PUTS(s); | |
1905 } | |
1906 | |
1907 static void do_intro_line __ARGS((int row, char_u *mesg, int add_version, int attr)); | |
1908 | |
1909 /* | |
5126
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1910 * 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
|
1911 */ |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1912 void |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1913 maybe_intro_message() |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1914 { |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1915 if (bufempty() |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1916 && curbuf->b_fname == NULL |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1917 #ifdef FEAT_WINDOWS |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1918 && firstwin->w_next == NULL |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1919 #endif |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1920 && vim_strchr(p_shm, SHM_INTRO) == NULL) |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1921 intro_message(FALSE); |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1922 } |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1923 |
71859e71b1f9
updated for version 7.3.1306
Bram Moolenaar <bram@vim.org>
parents:
5124
diff
changeset
|
1924 /* |
7 | 1925 * Give an introductory message about Vim. |
1926 * Only used when starting Vim on an empty file, without a file name. | |
1927 * Or with the ":intro" command (for Sven :-). | |
1928 */ | |
1929 void | |
1930 intro_message(colon) | |
1931 int colon; /* TRUE for ":intro" */ | |
1932 { | |
1933 int i; | |
1934 int row; | |
1935 int blanklines; | |
1936 int sponsor; | |
1937 char *p; | |
1938 static char *(lines[]) = | |
1939 { | |
1940 N_("VIM - Vi IMproved"), | |
1941 "", | |
1942 N_("version "), | |
1943 N_("by Bram Moolenaar et al."), | |
1944 #ifdef MODIFIED_BY | |
1945 " ", | |
1946 #endif | |
1947 N_("Vim is open source and freely distributable"), | |
1948 "", | |
1949 N_("Help poor children in Uganda!"), | |
1950 N_("type :help iccf<Enter> for information "), | |
1951 "", | |
1952 N_("type :q<Enter> to exit "), | |
1953 N_("type :help<Enter> or <F1> for on-line help"), | |
26 | 1954 N_("type :help version7<Enter> for version info"), |
7 | 1955 NULL, |
1956 "", | |
1957 N_("Running in Vi compatible mode"), | |
1958 N_("type :set nocp<Enter> for Vim defaults"), | |
1959 N_("type :help cp-default<Enter> for info on this"), | |
1960 }; | |
1961 #ifdef FEAT_GUI | |
1962 static char *(gui_lines[]) = | |
1963 { | |
1964 NULL, | |
1965 NULL, | |
1966 NULL, | |
1967 NULL, | |
1968 #ifdef MODIFIED_BY | |
1969 NULL, | |
1970 #endif | |
1971 NULL, | |
1972 NULL, | |
1973 NULL, | |
1974 N_("menu Help->Orphans for information "), | |
1975 NULL, | |
1976 N_("Running modeless, typed text is inserted"), | |
1977 N_("menu Edit->Global Settings->Toggle Insert Mode "), | |
1978 N_(" for two modes "), | |
1979 NULL, | |
1980 NULL, | |
1981 NULL, | |
1982 N_("menu Edit->Global Settings->Toggle Vi Compatible"), | |
1983 N_(" for Vim defaults "), | |
1984 }; | |
1985 #endif | |
1986 | |
1987 /* blanklines = screen height - # message lines */ | |
1988 blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1); | |
1989 if (!p_cp) | |
1990 blanklines += 4; /* add 4 for not showing "Vi compatible" message */ | |
1991 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
1992 if (mch_windows95()) | |
1993 blanklines -= 3; /* subtract 3 for showing "Windows 95" message */ | |
1994 #endif | |
1995 | |
1996 #ifdef FEAT_WINDOWS | |
1997 /* Don't overwrite a statusline. Depends on 'cmdheight'. */ | |
1998 if (p_ls > 1) | |
1999 blanklines -= Rows - topframe->fr_height; | |
2000 #endif | |
2001 if (blanklines < 0) | |
2002 blanklines = 0; | |
2003 | |
2004 /* Show the sponsor and register message one out of four times, the Uganda | |
2005 * message two out of four times. */ | |
615 | 2006 sponsor = (int)time(NULL); |
7 | 2007 sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0); |
2008 | |
2009 /* start displaying the message lines after half of the blank lines */ | |
2010 row = blanklines / 2; | |
2011 if ((row >= 2 && Columns >= 50) || colon) | |
2012 { | |
2013 for (i = 0; i < (int)(sizeof(lines) / sizeof(char *)); ++i) | |
2014 { | |
2015 p = lines[i]; | |
2016 #ifdef FEAT_GUI | |
2017 if (p_im && gui.in_use && gui_lines[i] != NULL) | |
2018 p = gui_lines[i]; | |
2019 #endif | |
2020 if (p == NULL) | |
2021 { | |
2022 if (!p_cp) | |
2023 break; | |
2024 continue; | |
2025 } | |
2026 if (sponsor != 0) | |
2027 { | |
2028 if (strstr(p, "children") != NULL) | |
2029 p = sponsor < 0 | |
2030 ? N_("Sponsor Vim development!") | |
2031 : N_("Become a registered Vim user!"); | |
2032 else if (strstr(p, "iccf") != NULL) | |
2033 p = sponsor < 0 | |
2034 ? N_("type :help sponsor<Enter> for information ") | |
2035 : N_("type :help register<Enter> for information "); | |
2036 else if (strstr(p, "Orphans") != NULL) | |
2037 p = N_("menu Help->Sponsor/Register for information "); | |
2038 } | |
2039 if (*p != NUL) | |
2040 do_intro_line(row, (char_u *)_(p), i == 2, 0); | |
2041 ++row; | |
2042 } | |
2043 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
2044 if (mch_windows95()) | |
2045 { | |
2046 do_intro_line(++row, | |
2047 (char_u *)_("WARNING: Windows 95/98/ME detected"), | |
2048 FALSE, hl_attr(HLF_E)); | |
2049 do_intro_line(++row, | |
2050 (char_u *)_("type :help windows95<Enter> for info on this"), | |
2051 FALSE, 0); | |
2052 } | |
2053 #endif | |
2054 } | |
2055 | |
2056 /* Make the wait-return message appear just below the text. */ | |
2057 if (colon) | |
2058 msg_row = row; | |
2059 } | |
2060 | |
2061 static void | |
2062 do_intro_line(row, mesg, add_version, attr) | |
2063 int row; | |
2064 char_u *mesg; | |
2065 int add_version; | |
2066 int attr; | |
2067 { | |
2068 char_u vers[20]; | |
2069 int col; | |
2070 char_u *p; | |
2071 int l; | |
2072 int clen; | |
2073 #ifdef MODIFIED_BY | |
2074 # define MODBY_LEN 150 | |
2075 char_u modby[MODBY_LEN]; | |
2076 | |
2077 if (*mesg == ' ') | |
2078 { | |
1491 | 2079 vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1); |
7 | 2080 l = STRLEN(modby); |
1491 | 2081 vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1); |
7 | 2082 mesg = modby; |
2083 } | |
2084 #endif | |
2085 | |
2086 /* Center the message horizontally. */ | |
2087 col = vim_strsize(mesg); | |
2088 if (add_version) | |
2089 { | |
2090 STRCPY(vers, mediumVersion); | |
2091 if (highest_patch()) | |
2092 { | |
2093 /* Check for 9.9x or 9.9xx, alpha/beta version */ | |
2619 | 2094 if (isalpha((int)vers[3])) |
7 | 2095 { |
3396 | 2096 int len = (isalpha((int)vers[4])) ? 5 : 4; |
2097 sprintf((char *)vers + len, ".%d%s", highest_patch(), | |
2098 mediumVersion + len); | |
7 | 2099 } |
2100 else | |
2101 sprintf((char *)vers + 3, ".%d", highest_patch()); | |
2102 } | |
2103 col += (int)STRLEN(vers); | |
2104 } | |
2105 col = (Columns - col) / 2; | |
2106 if (col < 0) | |
2107 col = 0; | |
2108 | |
2109 /* Split up in parts to highlight <> items differently. */ | |
2110 for (p = mesg; *p != NUL; p += l) | |
2111 { | |
2112 clen = 0; | |
2113 for (l = 0; p[l] != NUL | |
2114 && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l) | |
2115 { | |
2116 #ifdef FEAT_MBYTE | |
2117 if (has_mbyte) | |
2118 { | |
2119 clen += ptr2cells(p + l); | |
474 | 2120 l += (*mb_ptr2len)(p + l) - 1; |
7 | 2121 } |
2122 else | |
2123 #endif | |
2124 clen += byte2cells(p[l]); | |
2125 } | |
2126 screen_puts_len(p, l, row, col, *p == '<' ? hl_attr(HLF_8) : attr); | |
2127 col += clen; | |
2128 } | |
2129 | |
2130 /* Add the version number to the version line. */ | |
2131 if (add_version) | |
2132 screen_puts(vers, row, col, 0); | |
2133 } | |
2134 | |
2135 /* | |
2136 * ":intro": clear screen, display intro screen and wait for return. | |
2137 */ | |
2138 void | |
2139 ex_intro(eap) | |
1876 | 2140 exarg_T *eap UNUSED; |
7 | 2141 { |
2142 screenclear(); | |
2143 intro_message(TRUE); | |
2144 wait_return(TRUE); | |
2145 } |