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