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