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