Mercurial > vim
annotate src/version.c @ 2877:6bbdb9c7a425 v7.3.212
updated for version 7.3.212
Problem: With Python 3.2 ":py3" fails.
Solution: Move PyEval_InitThreads() to after Py_Initialize(). (Roland
Puntaier) Check abiflags in configure. (Andreas Behr)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 12 Jun 2011 21:37:13 +0200 |
parents | c7d942260772 |
children | 493897f8bf90 |
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]; | |
37 void | |
38 make_version() | |
39 { | |
40 /* | |
41 * Construct the long version string. Necessary because | |
42 * VAX C can't catenate strings in the preprocessor. | |
43 */ | |
44 strcpy(longVersion, VIM_VERSION_LONG_DATE); | |
45 strcat(longVersion, __DATE__); | |
46 strcat(longVersion, " "); | |
47 strcat(longVersion, __TIME__); | |
48 strcat(longVersion, ")"); | |
49 } | |
50 # else | |
51 char *longVersion = VIM_VERSION_LONG_DATE __DATE__ " " __TIME__ ")"; | |
52 # endif | |
53 #else | |
54 char *longVersion = VIM_VERSION_LONG; | |
55 #endif | |
56 | |
57 static void version_msg __ARGS((char *s)); | |
58 | |
59 static char *(features[]) = | |
60 { | |
61 #ifdef AMIGA /* only for Amiga systems */ | |
62 # ifdef FEAT_ARP | |
63 "+ARP", | |
64 # else | |
65 "-ARP", | |
66 # endif | |
67 #endif | |
68 #ifdef FEAT_ARABIC | |
69 "+arabic", | |
70 #else | |
71 "-arabic", | |
72 #endif | |
73 #ifdef FEAT_AUTOCMD | |
74 "+autocmd", | |
75 #else | |
76 "-autocmd", | |
77 #endif | |
78 #ifdef FEAT_BEVAL | |
79 "+balloon_eval", | |
80 #else | |
81 "-balloon_eval", | |
82 #endif | |
83 #ifdef FEAT_BROWSE | |
84 "+browse", | |
85 #else | |
86 "-browse", | |
87 #endif | |
88 #ifdef NO_BUILTIN_TCAPS | |
89 "-builtin_terms", | |
90 #endif | |
91 #ifdef SOME_BUILTIN_TCAPS | |
92 "+builtin_terms", | |
93 #endif | |
94 #ifdef ALL_BUILTIN_TCAPS | |
95 "++builtin_terms", | |
96 #endif | |
97 #ifdef FEAT_BYTEOFF | |
98 "+byte_offset", | |
99 #else | |
100 "-byte_offset", | |
101 #endif | |
102 #ifdef FEAT_CINDENT | |
103 "+cindent", | |
104 #else | |
105 "-cindent", | |
106 #endif | |
107 #ifdef FEAT_CLIENTSERVER | |
108 "+clientserver", | |
109 #else | |
110 "-clientserver", | |
111 #endif | |
112 #ifdef FEAT_CLIPBOARD | |
113 "+clipboard", | |
114 #else | |
115 "-clipboard", | |
116 #endif | |
117 #ifdef FEAT_CMDL_COMPL | |
118 "+cmdline_compl", | |
119 #else | |
120 "-cmdline_compl", | |
121 #endif | |
122 #ifdef FEAT_CMDHIST | |
123 "+cmdline_hist", | |
124 #else | |
125 "-cmdline_hist", | |
126 #endif | |
127 #ifdef FEAT_CMDL_INFO | |
128 "+cmdline_info", | |
129 #else | |
130 "-cmdline_info", | |
131 #endif | |
132 #ifdef FEAT_COMMENTS | |
133 "+comments", | |
134 #else | |
135 "-comments", | |
136 #endif | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
137 #ifdef FEAT_CONCEAL |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
138 "+conceal", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
139 #else |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
140 "-conceal", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
141 #endif |
7 | 142 #ifdef FEAT_CRYPT |
143 "+cryptv", | |
144 #else | |
145 "-cryptv", | |
146 #endif | |
147 #ifdef FEAT_CSCOPE | |
148 "+cscope", | |
149 #else | |
150 "-cscope", | |
151 #endif | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
152 #ifdef FEAT_CURSORBIND |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
153 "+cursorbind", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
154 #else |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
155 "-cursorbind", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
156 #endif |
647 | 157 #ifdef CURSOR_SHAPE |
158 "+cursorshape", | |
159 #else | |
160 "-cursorshape", | |
161 #endif | |
7 | 162 #if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG) |
163 "+dialog_con_gui", | |
164 #else | |
165 # if defined(FEAT_CON_DIALOG) | |
166 "+dialog_con", | |
167 # else | |
168 # if defined(FEAT_GUI_DIALOG) | |
169 "+dialog_gui", | |
170 # else | |
171 "-dialog", | |
172 # endif | |
173 # endif | |
174 #endif | |
175 #ifdef FEAT_DIFF | |
176 "+diff", | |
177 #else | |
178 "-diff", | |
179 #endif | |
180 #ifdef FEAT_DIGRAPHS | |
181 "+digraphs", | |
182 #else | |
183 "-digraphs", | |
184 #endif | |
185 #ifdef FEAT_DND | |
186 "+dnd", | |
187 #else | |
188 "-dnd", | |
189 #endif | |
190 #ifdef EBCDIC | |
191 "+ebcdic", | |
192 #else | |
193 "-ebcdic", | |
194 #endif | |
195 #ifdef FEAT_EMACS_TAGS | |
196 "+emacs_tags", | |
197 #else | |
198 "-emacs_tags", | |
199 #endif | |
200 #ifdef FEAT_EVAL | |
201 "+eval", | |
202 #else | |
203 "-eval", | |
204 #endif | |
205 #ifdef FEAT_EX_EXTRA | |
206 "+ex_extra", | |
207 #else | |
208 "-ex_extra", | |
209 #endif | |
210 #ifdef FEAT_SEARCH_EXTRA | |
211 "+extra_search", | |
212 #else | |
213 "-extra_search", | |
214 #endif | |
215 #ifdef FEAT_FKMAP | |
216 "+farsi", | |
217 #else | |
218 "-farsi", | |
219 #endif | |
220 #ifdef FEAT_SEARCHPATH | |
221 "+file_in_path", | |
222 #else | |
223 "-file_in_path", | |
224 #endif | |
225 #ifdef FEAT_FIND_ID | |
226 "+find_in_path", | |
227 #else | |
228 "-find_in_path", | |
229 #endif | |
1621 | 230 #ifdef FEAT_FLOAT |
231 "+float", | |
232 #else | |
233 "-float", | |
234 #endif | |
7 | 235 #ifdef FEAT_FOLDING |
236 "+folding", | |
237 #else | |
238 "-folding", | |
239 #endif | |
240 #ifdef FEAT_FOOTER | |
241 "+footer", | |
242 #else | |
243 "-footer", | |
244 #endif | |
245 /* only interesting on Unix systems */ | |
246 #if !defined(USE_SYSTEM) && defined(UNIX) | |
247 "+fork()", | |
248 #endif | |
249 #ifdef FEAT_GETTEXT | |
250 # ifdef DYNAMIC_GETTEXT | |
251 "+gettext/dyn", | |
252 # else | |
253 "+gettext", | |
254 # endif | |
255 #else | |
256 "-gettext", | |
257 #endif | |
258 #ifdef FEAT_HANGULIN | |
259 "+hangul_input", | |
260 #else | |
261 "-hangul_input", | |
262 #endif | |
263 #if (defined(HAVE_ICONV_H) && defined(USE_ICONV)) || defined(DYNAMIC_ICONV) | |
264 # ifdef DYNAMIC_ICONV | |
265 "+iconv/dyn", | |
266 # else | |
267 "+iconv", | |
268 # endif | |
269 #else | |
270 "-iconv", | |
271 #endif | |
272 #ifdef FEAT_INS_EXPAND | |
273 "+insert_expand", | |
274 #else | |
275 "-insert_expand", | |
276 #endif | |
277 #ifdef FEAT_JUMPLIST | |
278 "+jumplist", | |
279 #else | |
280 "-jumplist", | |
281 #endif | |
282 #ifdef FEAT_KEYMAP | |
283 "+keymap", | |
284 #else | |
285 "-keymap", | |
286 #endif | |
287 #ifdef FEAT_LANGMAP | |
288 "+langmap", | |
289 #else | |
290 "-langmap", | |
291 #endif | |
292 #ifdef FEAT_LIBCALL | |
293 "+libcall", | |
294 #else | |
295 "-libcall", | |
296 #endif | |
297 #ifdef FEAT_LINEBREAK | |
298 "+linebreak", | |
299 #else | |
300 "-linebreak", | |
301 #endif | |
302 #ifdef FEAT_LISP | |
303 "+lispindent", | |
304 #else | |
305 "-lispindent", | |
306 #endif | |
307 #ifdef FEAT_LISTCMDS | |
308 "+listcmds", | |
309 #else | |
310 "-listcmds", | |
311 #endif | |
312 #ifdef FEAT_LOCALMAP | |
313 "+localmap", | |
314 #else | |
315 "-localmap", | |
316 #endif | |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
317 #ifdef FEAT_LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
318 # ifdef DYNAMIC_LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
319 "+lua/dyn", |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
320 # else |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
321 "+lua", |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
322 # endif |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
323 #else |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
324 "-lua", |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
325 #endif |
7 | 326 #ifdef FEAT_MENU |
327 "+menu", | |
328 #else | |
329 "-menu", | |
330 #endif | |
331 #ifdef FEAT_SESSION | |
332 "+mksession", | |
333 #else | |
334 "-mksession", | |
335 #endif | |
336 #ifdef FEAT_MODIFY_FNAME | |
337 "+modify_fname", | |
338 #else | |
339 "-modify_fname", | |
340 #endif | |
341 #ifdef FEAT_MOUSE | |
342 "+mouse", | |
343 # ifdef FEAT_MOUSESHAPE | |
344 "+mouseshape", | |
345 # else | |
346 "-mouseshape", | |
347 # endif | |
348 # else | |
349 "-mouse", | |
350 #endif | |
351 #if defined(UNIX) || defined(VMS) | |
352 # ifdef FEAT_MOUSE_DEC | |
353 "+mouse_dec", | |
354 # else | |
355 "-mouse_dec", | |
356 # endif | |
357 # ifdef FEAT_MOUSE_GPM | |
358 "+mouse_gpm", | |
359 # else | |
360 "-mouse_gpm", | |
361 # endif | |
362 # ifdef FEAT_MOUSE_JSB | |
363 "+mouse_jsbterm", | |
364 # else | |
365 "-mouse_jsbterm", | |
366 # endif | |
367 # ifdef FEAT_MOUSE_NET | |
368 "+mouse_netterm", | |
369 # else | |
370 "-mouse_netterm", | |
371 # endif | |
1621 | 372 # ifdef FEAT_SYSMOUSE |
373 "+mouse_sysmouse", | |
374 # else | |
375 "-mouse_sysmouse", | |
376 # endif | |
7 | 377 # ifdef FEAT_MOUSE_XTERM |
378 "+mouse_xterm", | |
379 # else | |
380 "-mouse_xterm", | |
381 # endif | |
382 #endif | |
383 #ifdef __QNX__ | |
384 # ifdef FEAT_MOUSE_PTERM | |
385 "+mouse_pterm", | |
386 # else | |
387 "-mouse_pterm", | |
388 # endif | |
389 #endif | |
390 #ifdef FEAT_MBYTE_IME | |
391 # ifdef DYNAMIC_IME | |
392 "+multi_byte_ime/dyn", | |
393 # else | |
394 "+multi_byte_ime", | |
395 # endif | |
396 #else | |
397 # ifdef FEAT_MBYTE | |
398 "+multi_byte", | |
399 # else | |
400 "-multi_byte", | |
401 # endif | |
402 #endif | |
403 #ifdef FEAT_MULTI_LANG | |
404 "+multi_lang", | |
405 #else | |
406 "-multi_lang", | |
407 #endif | |
14 | 408 #ifdef FEAT_MZSCHEME |
132 | 409 # ifdef DYNAMIC_MZSCHEME |
410 "+mzscheme/dyn", | |
411 # else | |
14 | 412 "+mzscheme", |
132 | 413 # endif |
14 | 414 #else |
415 "-mzscheme", | |
416 #endif | |
7 | 417 #ifdef FEAT_NETBEANS_INTG |
418 "+netbeans_intg", | |
419 #else | |
420 "-netbeans_intg", | |
421 #endif | |
422 #ifdef FEAT_GUI_W32 | |
423 # ifdef FEAT_OLE | |
424 "+ole", | |
425 # else | |
426 "-ole", | |
427 # endif | |
428 #endif | |
429 #ifdef FEAT_PATH_EXTRA | |
430 "+path_extra", | |
431 #else | |
432 "-path_extra", | |
433 #endif | |
434 #ifdef FEAT_PERL | |
435 # ifdef DYNAMIC_PERL | |
436 "+perl/dyn", | |
437 # else | |
438 "+perl", | |
439 # endif | |
440 #else | |
441 "-perl", | |
442 #endif | |
2214
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
443 #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
|
444 "+persistent_undo", |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
445 #else |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
446 "-persistent_undo", |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
447 #endif |
7 | 448 #ifdef FEAT_PRINTER |
449 # ifdef FEAT_POSTSCRIPT | |
450 "+postscript", | |
451 # else | |
452 "-postscript", | |
453 # endif | |
454 "+printer", | |
455 #else | |
456 "-printer", | |
457 #endif | |
170 | 458 #ifdef FEAT_PROFILE |
459 "+profile", | |
460 #else | |
461 "-profile", | |
462 #endif | |
7 | 463 #ifdef FEAT_PYTHON |
464 # ifdef DYNAMIC_PYTHON | |
465 "+python/dyn", | |
466 # else | |
467 "+python", | |
468 # endif | |
469 #else | |
470 "-python", | |
471 #endif | |
2329
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
472 #ifdef FEAT_PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
473 # ifdef DYNAMIC_PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
474 "+python3/dyn", |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
475 # else |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
476 "+python3", |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
477 # endif |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
478 #else |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
479 "-python3", |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
480 #endif |
7 | 481 #ifdef FEAT_QUICKFIX |
482 "+quickfix", | |
483 #else | |
484 "-quickfix", | |
485 #endif | |
857 | 486 #ifdef FEAT_RELTIME |
487 "+reltime", | |
488 #else | |
489 "-reltime", | |
490 #endif | |
7 | 491 #ifdef FEAT_RIGHTLEFT |
492 "+rightleft", | |
493 #else | |
494 "-rightleft", | |
495 #endif | |
496 #ifdef FEAT_RUBY | |
497 # ifdef DYNAMIC_RUBY | |
498 "+ruby/dyn", | |
499 # else | |
500 "+ruby", | |
501 # endif | |
502 #else | |
503 "-ruby", | |
504 #endif | |
505 #ifdef FEAT_SCROLLBIND | |
506 "+scrollbind", | |
507 #else | |
508 "-scrollbind", | |
509 #endif | |
510 #ifdef FEAT_SIGNS | |
511 "+signs", | |
512 #else | |
513 "-signs", | |
514 #endif | |
515 #ifdef FEAT_SMARTINDENT | |
516 "+smartindent", | |
517 #else | |
518 "-smartindent", | |
519 #endif | |
520 #ifdef FEAT_SNIFF | |
521 "+sniff", | |
522 #else | |
523 "-sniff", | |
524 #endif | |
1989 | 525 #ifdef STARTUPTIME |
526 "+startuptime", | |
527 #else | |
528 "-startuptime", | |
529 #endif | |
7 | 530 #ifdef FEAT_STL_OPT |
531 "+statusline", | |
532 #else | |
533 "-statusline", | |
534 #endif | |
535 #ifdef FEAT_SUN_WORKSHOP | |
536 "+sun_workshop", | |
537 #else | |
538 "-sun_workshop", | |
539 #endif | |
540 #ifdef FEAT_SYN_HL | |
541 "+syntax", | |
542 #else | |
543 "-syntax", | |
544 #endif | |
545 /* only interesting on Unix systems */ | |
546 #if defined(USE_SYSTEM) && (defined(UNIX) || defined(__EMX__)) | |
547 "+system()", | |
548 #endif | |
549 #ifdef FEAT_TAG_BINS | |
550 "+tag_binary", | |
551 #else | |
552 "-tag_binary", | |
553 #endif | |
554 #ifdef FEAT_TAG_OLDSTATIC | |
555 "+tag_old_static", | |
556 #else | |
557 "-tag_old_static", | |
558 #endif | |
559 #ifdef FEAT_TAG_ANYWHITE | |
560 "+tag_any_white", | |
561 #else | |
562 "-tag_any_white", | |
563 #endif | |
564 #ifdef FEAT_TCL | |
565 # ifdef DYNAMIC_TCL | |
566 "+tcl/dyn", | |
567 # else | |
568 "+tcl", | |
569 # endif | |
570 #else | |
571 "-tcl", | |
572 #endif | |
573 #if defined(UNIX) || defined(__EMX__) | |
574 /* only Unix (or OS/2 with EMX!) can have terminfo instead of termcap */ | |
575 # ifdef TERMINFO | |
576 "+terminfo", | |
577 # else | |
578 "-terminfo", | |
579 # endif | |
580 #else /* unix always includes termcap support */ | |
581 # ifdef HAVE_TGETENT | |
582 "+tgetent", | |
583 # else | |
584 "-tgetent", | |
585 # endif | |
586 #endif | |
587 #ifdef FEAT_TERMRESPONSE | |
588 "+termresponse", | |
589 #else | |
590 "-termresponse", | |
591 #endif | |
592 #ifdef FEAT_TEXTOBJ | |
593 "+textobjects", | |
594 #else | |
595 "-textobjects", | |
596 #endif | |
597 #ifdef FEAT_TITLE | |
598 "+title", | |
599 #else | |
600 "-title", | |
601 #endif | |
602 #ifdef FEAT_TOOLBAR | |
603 "+toolbar", | |
604 #else | |
605 "-toolbar", | |
606 #endif | |
607 #ifdef FEAT_USR_CMDS | |
608 "+user_commands", | |
609 #else | |
610 "-user_commands", | |
611 #endif | |
612 #ifdef FEAT_VERTSPLIT | |
613 "+vertsplit", | |
614 #else | |
615 "-vertsplit", | |
616 #endif | |
617 #ifdef FEAT_VIRTUALEDIT | |
618 "+virtualedit", | |
619 #else | |
620 "-virtualedit", | |
621 #endif | |
622 #ifdef FEAT_VISUAL | |
623 "+visual", | |
624 # ifdef FEAT_VISUALEXTRA | |
625 "+visualextra", | |
626 # else | |
627 "-visualextra", | |
628 # endif | |
629 #else | |
630 "-visual", | |
631 #endif | |
632 #ifdef FEAT_VIMINFO | |
633 "+viminfo", | |
634 #else | |
635 "-viminfo", | |
636 #endif | |
637 #ifdef FEAT_VREPLACE | |
638 "+vreplace", | |
639 #else | |
640 "-vreplace", | |
641 #endif | |
642 #ifdef FEAT_WILDIGN | |
643 "+wildignore", | |
644 #else | |
645 "-wildignore", | |
646 #endif | |
647 #ifdef FEAT_WILDMENU | |
648 "+wildmenu", | |
649 #else | |
650 "-wildmenu", | |
651 #endif | |
652 #ifdef FEAT_WINDOWS | |
653 "+windows", | |
654 #else | |
655 "-windows", | |
656 #endif | |
657 #ifdef FEAT_WRITEBACKUP | |
658 "+writebackup", | |
659 #else | |
660 "-writebackup", | |
661 #endif | |
662 #if defined(UNIX) || defined(VMS) | |
663 # ifdef FEAT_X11 | |
664 "+X11", | |
665 # else | |
666 "-X11", | |
667 # endif | |
668 #endif | |
669 #ifdef FEAT_XFONTSET | |
670 "+xfontset", | |
671 #else | |
672 "-xfontset", | |
673 #endif | |
674 #ifdef FEAT_XIM | |
675 "+xim", | |
676 #else | |
677 "-xim", | |
678 #endif | |
679 #if defined(UNIX) || defined(VMS) | |
680 # ifdef USE_XSMP_INTERACT | |
681 "+xsmp_interact", | |
682 # else | |
683 # ifdef USE_XSMP | |
684 "+xsmp", | |
685 # else | |
686 "-xsmp", | |
687 # endif | |
688 # endif | |
689 # ifdef FEAT_XCLIPBOARD | |
690 "+xterm_clipboard", | |
691 # else | |
692 "-xterm_clipboard", | |
693 # endif | |
694 #endif | |
695 #ifdef FEAT_XTERM_SAVE | |
696 "+xterm_save", | |
697 #else | |
698 "-xterm_save", | |
699 #endif | |
700 #ifdef WIN3264 | |
701 # ifdef FEAT_XPM_W32 | |
702 "+xpm_w32", | |
703 # else | |
704 "-xpm_w32", | |
705 # endif | |
706 #endif | |
707 NULL | |
708 }; | |
709 | |
710 static int included_patches[] = | |
711 { /* Add new patch number below this line */ | |
712 /**/ | |
2877 | 713 212, |
714 /**/ | |
2875 | 715 211, |
716 /**/ | |
2873 | 717 210, |
718 /**/ | |
2871 | 719 209, |
720 /**/ | |
2869 | 721 208, |
722 /**/ | |
2867 | 723 207, |
724 /**/ | |
2865 | 725 206, |
726 /**/ | |
2863 | 727 205, |
728 /**/ | |
2861 | 729 204, |
730 /**/ | |
2859 | 731 203, |
732 /**/ | |
2857 | 733 202, |
734 /**/ | |
2855 | 735 201, |
736 /**/ | |
2853 | 737 200, |
738 /**/ | |
2851 | 739 199, |
740 /**/ | |
2849 | 741 198, |
742 /**/ | |
2847 | 743 197, |
744 /**/ | |
2845 | 745 196, |
746 /**/ | |
2843 | 747 195, |
748 /**/ | |
2841 | 749 194, |
750 /**/ | |
2839 | 751 193, |
752 /**/ | |
2837 | 753 192, |
754 /**/ | |
2834 | 755 191, |
756 /**/ | |
2831 | 757 190, |
758 /**/ | |
2829 | 759 189, |
760 /**/ | |
2827 | 761 188, |
762 /**/ | |
2823 | 763 187, |
764 /**/ | |
2821 | 765 186, |
766 /**/ | |
2819 | 767 185, |
768 /**/ | |
2817 | 769 184, |
770 /**/ | |
2815 | 771 183, |
772 /**/ | |
2813 | 773 182, |
774 /**/ | |
2811 | 775 181, |
776 /**/ | |
2809 | 777 180, |
778 /**/ | |
2807 | 779 179, |
780 /**/ | |
2805 | 781 178, |
782 /**/ | |
2803 | 783 177, |
784 /**/ | |
2801 | 785 176, |
786 /**/ | |
2799 | 787 175, |
788 /**/ | |
2797 | 789 174, |
790 /**/ | |
2795 | 791 173, |
792 /**/ | |
2793 | 793 172, |
794 /**/ | |
2791 | 795 171, |
796 /**/ | |
2789 | 797 170, |
798 /**/ | |
2786 | 799 169, |
800 /**/ | |
2784 | 801 168, |
802 /**/ | |
2782 | 803 167, |
804 /**/ | |
2780 | 805 166, |
806 /**/ | |
2778 | 807 165, |
808 /**/ | |
2776 | 809 164, |
810 /**/ | |
2774 | 811 163, |
812 /**/ | |
2772 | 813 162, |
814 /**/ | |
2770 | 815 161, |
816 /**/ | |
2768 | 817 160, |
818 /**/ | |
2766 | 819 159, |
820 /**/ | |
2764 | 821 158, |
822 /**/ | |
2762 | 823 157, |
824 /**/ | |
2760 | 825 156, |
826 /**/ | |
2758 | 827 155, |
828 /**/ | |
2756 | 829 154, |
830 /**/ | |
2754 | 831 153, |
832 /**/ | |
2752 | 833 152, |
834 /**/ | |
2749 | 835 151, |
836 /**/ | |
2747 | 837 150, |
838 /**/ | |
2745 | 839 149, |
840 /**/ | |
2743 | 841 148, |
842 /**/ | |
2741 | 843 147, |
844 /**/ | |
2739 | 845 146, |
846 /**/ | |
2737 | 847 145, |
848 /**/ | |
2735 | 849 144, |
850 /**/ | |
2730 | 851 143, |
852 /**/ | |
2727 | 853 142, |
854 /**/ | |
2726 | 855 141, |
856 /**/ | |
2724 | 857 140, |
858 /**/ | |
2723 | 859 139, |
860 /**/ | |
2722 | 861 138, |
862 /**/ | |
2721 | 863 137, |
864 /**/ | |
2720 | 865 136, |
866 /**/ | |
2719 | 867 135, |
868 /**/ | |
2718 | 869 134, |
870 /**/ | |
2717 | 871 133, |
872 /**/ | |
2716 | 873 132, |
874 /**/ | |
2715 | 875 131, |
876 /**/ | |
2714 | 877 130, |
878 /**/ | |
2713 | 879 129, |
880 /**/ | |
2712 | 881 128, |
882 /**/ | |
2711 | 883 127, |
884 /**/ | |
2710 | 885 126, |
886 /**/ | |
2708 | 887 125, |
888 /**/ | |
2707 | 889 124, |
890 /**/ | |
2706 | 891 123, |
892 /**/ | |
2705 | 893 122, |
894 /**/ | |
2704 | 895 121, |
896 /**/ | |
2703 | 897 120, |
898 /**/ | |
2702 | 899 119, |
900 /**/ | |
2701 | 901 118, |
902 /**/ | |
2700 | 903 117, |
904 /**/ | |
2699 | 905 116, |
906 /**/ | |
2697 | 907 115, |
908 /**/ | |
2696 | 909 114, |
910 /**/ | |
2695 | 911 113, |
912 /**/ | |
2694 | 913 112, |
914 /**/ | |
2693 | 915 111, |
916 /**/ | |
2692 | 917 110, |
918 /**/ | |
2691 | 919 109, |
920 /**/ | |
2690 | 921 108, |
922 /**/ | |
2689 | 923 107, |
924 /**/ | |
2688 | 925 106, |
926 /**/ | |
2687 | 927 105, |
928 /**/ | |
2686 | 929 104, |
930 /**/ | |
2685 | 931 103, |
932 /**/ | |
2684 | 933 102, |
934 /**/ | |
2683 | 935 101, |
936 /**/ | |
2682 | 937 100, |
938 /**/ | |
2680 | 939 99, |
940 /**/ | |
2679 | 941 98, |
942 /**/ | |
2678 | 943 97, |
944 /**/ | |
2677 | 945 96, |
946 /**/ | |
2676 | 947 95, |
948 /**/ | |
2675 | 949 94, |
950 /**/ | |
2674 | 951 93, |
952 /**/ | |
2673 | 953 92, |
954 /**/ | |
2672 | 955 91, |
956 /**/ | |
2671 | 957 90, |
958 /**/ | |
2670 | 959 89, |
960 /**/ | |
2669 | 961 88, |
962 /**/ | |
2668 | 963 87, |
964 /**/ | |
2667 | 965 86, |
966 /**/ | |
2666 | 967 85, |
968 /**/ | |
2665 | 969 84, |
970 /**/ | |
2664 | 971 83, |
972 /**/ | |
2663 | 973 82, |
974 /**/ | |
2661 | 975 81, |
976 /**/ | |
2660 | 977 80, |
978 /**/ | |
2659 | 979 79, |
980 /**/ | |
2658 | 981 78, |
982 /**/ | |
2657 | 983 77, |
984 /**/ | |
2656 | 985 76, |
986 /**/ | |
2655 | 987 75, |
988 /**/ | |
2654 | 989 74, |
990 /**/ | |
2653 | 991 73, |
992 /**/ | |
2652 | 993 72, |
994 /**/ | |
2651 | 995 71, |
996 /**/ | |
2650 | 997 70, |
998 /**/ | |
2649 | 999 69, |
1000 /**/ | |
2648 | 1001 68, |
1002 /**/ | |
2647 | 1003 67, |
1004 /**/ | |
2646 | 1005 66, |
1006 /**/ | |
2645 | 1007 65, |
1008 /**/ | |
2644 | 1009 64, |
1010 /**/ | |
2643 | 1011 63, |
1012 /**/ | |
2641 | 1013 62, |
1014 /**/ | |
2640 | 1015 61, |
1016 /**/ | |
2639 | 1017 60, |
1018 /**/ | |
2638 | 1019 59, |
1020 /**/ | |
2637 | 1021 58, |
1022 /**/ | |
2636 | 1023 57, |
1024 /**/ | |
2635 | 1025 56, |
1026 /**/ | |
2634 | 1027 55, |
1028 /**/ | |
2633 | 1029 54, |
1030 /**/ | |
2632 | 1031 53, |
1032 /**/ | |
2631 | 1033 52, |
1034 /**/ | |
2630 | 1035 51, |
1036 /**/ | |
2629 | 1037 50, |
1038 /**/ | |
2628 | 1039 49, |
1040 /**/ | |
2627 | 1041 48, |
1042 /**/ | |
2626 | 1043 47, |
1044 /**/ | |
2624 | 1045 46, |
1046 /**/ | |
2623 | 1047 45, |
1048 /**/ | |
2622 | 1049 44, |
1050 /**/ | |
2621 | 1051 43, |
1052 /**/ | |
2620 | 1053 42, |
1054 /**/ | |
2619 | 1055 41, |
1056 /**/ | |
2618 | 1057 40, |
1058 /**/ | |
2617 | 1059 39, |
1060 /**/ | |
2616 | 1061 38, |
1062 /**/ | |
2615 | 1063 37, |
1064 /**/ | |
2614 | 1065 36, |
1066 /**/ | |
2613 | 1067 35, |
1068 /**/ | |
2612 | 1069 34, |
1070 /**/ | |
2611 | 1071 33, |
1072 /**/ | |
2610 | 1073 32, |
1074 /**/ | |
2609 | 1075 31, |
1076 /**/ | |
2607 | 1077 30, |
1078 /**/ | |
2606 | 1079 29, |
1080 /**/ | |
2605 | 1081 28, |
1082 /**/ | |
2604 | 1083 27, |
1084 /**/ | |
2603 | 1085 26, |
1086 /**/ | |
2602 | 1087 25, |
1088 /**/ | |
2601 | 1089 24, |
1090 /**/ | |
2600 | 1091 23, |
1092 /**/ | |
2599 | 1093 22, |
1094 /**/ | |
2598 | 1095 21, |
1096 /**/ | |
2597 | 1097 20, |
1098 /**/ | |
2595 | 1099 19, |
1100 /**/ | |
2594 | 1101 18, |
1102 /**/ | |
2593 | 1103 17, |
1104 /**/ | |
2592 | 1105 16, |
1106 /**/ | |
2591 | 1107 15, |
1108 /**/ | |
2590 | 1109 14, |
1110 /**/ | |
2589 | 1111 13, |
1112 /**/ | |
2588 | 1113 12, |
1114 /**/ | |
2586 | 1115 11, |
1116 /**/ | |
2585 | 1117 10, |
1118 /**/ | |
2584 | 1119 9, |
1120 /**/ | |
2583 | 1121 8, |
1122 /**/ | |
2582 | 1123 7, |
1124 /**/ | |
2580 | 1125 6, |
1126 /**/ | |
2579 | 1127 5, |
1128 /**/ | |
2578 | 1129 4, |
1130 /**/ | |
2165
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1131 3, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1132 /**/ |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1133 2, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1134 /**/ |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1135 1, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1136 /**/ |
7 | 1137 0 |
1138 }; | |
1139 | |
1760 | 1140 /* |
1141 * Place to put a short description when adding a feature with a patch. | |
1142 * Keep it short, e.g.,: "relative numbers", "persistent undo". | |
1143 * Also add a comment marker to separate the lines. | |
1144 * See the official Vim patches for the diff format: It must use a context of | |
1777 | 1145 * one line only. Create it by hand or use "diff -C2" and edit the patch. |
1760 | 1146 */ |
1147 static char *(extra_patches[]) = | |
1148 { /* Add your patch description below this line */ | |
1149 /**/ | |
1150 NULL | |
1151 }; | |
1152 | |
7 | 1153 int |
1154 highest_patch() | |
1155 { | |
1156 int i; | |
1157 int h = 0; | |
1158 | |
1159 for (i = 0; included_patches[i] != 0; ++i) | |
1160 if (included_patches[i] > h) | |
1161 h = included_patches[i]; | |
1162 return h; | |
1163 } | |
1164 | |
1165 #if defined(FEAT_EVAL) || defined(PROTO) | |
1166 /* | |
1167 * Return TRUE if patch "n" has been included. | |
1168 */ | |
1169 int | |
1170 has_patch(n) | |
1171 int n; | |
1172 { | |
1173 int i; | |
1174 | |
1175 for (i = 0; included_patches[i] != 0; ++i) | |
1176 if (included_patches[i] == n) | |
1177 return TRUE; | |
1178 return FALSE; | |
1179 } | |
1180 #endif | |
1181 | |
1182 void | |
1183 ex_version(eap) | |
1184 exarg_T *eap; | |
1185 { | |
1186 /* | |
1187 * Ignore a ":version 9.99" command. | |
1188 */ | |
1189 if (*eap->arg == NUL) | |
1190 { | |
1191 msg_putchar('\n'); | |
1192 list_version(); | |
1193 } | |
1194 } | |
1195 | |
1196 void | |
1197 list_version() | |
1198 { | |
1199 int i; | |
1200 int first; | |
1201 char *s = ""; | |
1202 | |
1203 /* | |
1204 * When adding features here, don't forget to update the list of | |
1205 * internal variables in eval.c! | |
1206 */ | |
1207 MSG(longVersion); | |
1208 #ifdef WIN3264 | |
1209 # ifdef FEAT_GUI_W32 | |
1210 # if defined(_MSC_VER) && (_MSC_VER <= 1010) | |
1211 /* Only MS VC 4.1 and earlier can do Win32s */ | |
1607 | 1212 MSG_PUTS(_("\nMS-Windows 16/32-bit GUI version")); |
7 | 1213 # else |
990 | 1214 # ifdef _WIN64 |
1607 | 1215 MSG_PUTS(_("\nMS-Windows 64-bit GUI version")); |
990 | 1216 # else |
1607 | 1217 MSG_PUTS(_("\nMS-Windows 32-bit GUI version")); |
990 | 1218 # endif |
7 | 1219 # endif |
1220 if (gui_is_win32s()) | |
1221 MSG_PUTS(_(" in Win32s mode")); | |
1222 # ifdef FEAT_OLE | |
1223 MSG_PUTS(_(" with OLE support")); | |
1224 # endif | |
1225 # else | |
1607 | 1226 # ifdef _WIN64 |
1227 MSG_PUTS(_("\nMS-Windows 64-bit console version")); | |
1228 # else | |
1229 MSG_PUTS(_("\nMS-Windows 32-bit console version")); | |
1230 # endif | |
7 | 1231 # endif |
1232 #endif | |
1233 #ifdef WIN16 | |
1607 | 1234 MSG_PUTS(_("\nMS-Windows 16-bit version")); |
7 | 1235 #endif |
1236 #ifdef MSDOS | |
1237 # ifdef DJGPP | |
1607 | 1238 MSG_PUTS(_("\n32-bit MS-DOS version")); |
7 | 1239 # else |
1607 | 1240 MSG_PUTS(_("\n16-bit MS-DOS version")); |
7 | 1241 # endif |
1242 #endif | |
1243 #ifdef MACOS | |
1244 # ifdef MACOS_X | |
1245 # ifdef MACOS_X_UNIX | |
1246 MSG_PUTS(_("\nMacOS X (unix) version")); | |
1247 # else | |
1248 MSG_PUTS(_("\nMacOS X version")); | |
1249 # endif | |
1250 #else | |
1251 MSG_PUTS(_("\nMacOS version")); | |
1252 # endif | |
1253 #endif | |
1254 | |
1255 #ifdef VMS | |
1705 | 1256 MSG_PUTS(_("\nOpenVMS version")); |
1045 | 1257 # ifdef HAVE_PATHDEF |
1258 if (*compiled_arch != NUL) | |
1259 { | |
1260 MSG_PUTS(" - "); | |
1261 MSG_PUTS(compiled_arch); | |
1262 } | |
1263 # endif | |
1264 | |
7 | 1265 #endif |
1266 | |
1267 /* Print the list of patch numbers if there is at least one. */ | |
1268 /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */ | |
1269 if (included_patches[0] != 0) | |
1270 { | |
1271 MSG_PUTS(_("\nIncluded patches: ")); | |
1272 first = -1; | |
1273 /* find last one */ | |
1274 for (i = 0; included_patches[i] != 0; ++i) | |
1275 ; | |
1276 while (--i >= 0) | |
1277 { | |
1278 if (first < 0) | |
1279 first = included_patches[i]; | |
1280 if (i == 0 || included_patches[i - 1] != included_patches[i] + 1) | |
1281 { | |
1282 MSG_PUTS(s); | |
1283 s = ", "; | |
1284 msg_outnum((long)first); | |
1285 if (first != included_patches[i]) | |
1286 { | |
1287 MSG_PUTS("-"); | |
1288 msg_outnum((long)included_patches[i]); | |
1289 } | |
1290 first = -1; | |
1291 } | |
1292 } | |
1293 } | |
1294 | |
1760 | 1295 /* Print the list of extra patch descriptions if there is at least one. */ |
1296 if (extra_patches[0] != NULL) | |
1297 { | |
1298 MSG_PUTS(_("\nExtra patches: ")); | |
1299 s = ""; | |
1300 for (i = 0; extra_patches[i] != NULL; ++i) | |
1301 { | |
1302 MSG_PUTS(s); | |
1303 s = ", "; | |
1304 MSG_PUTS(extra_patches[i]); | |
1305 } | |
1306 } | |
1307 | |
7 | 1308 #ifdef MODIFIED_BY |
1309 MSG_PUTS("\n"); | |
1310 MSG_PUTS(_("Modified by ")); | |
1311 MSG_PUTS(MODIFIED_BY); | |
1312 #endif | |
1313 | |
1314 #ifdef HAVE_PATHDEF | |
1315 if (*compiled_user != NUL || *compiled_sys != NUL) | |
1316 { | |
1317 MSG_PUTS(_("\nCompiled ")); | |
1318 if (*compiled_user != NUL) | |
1319 { | |
1320 MSG_PUTS(_("by ")); | |
1321 MSG_PUTS(compiled_user); | |
1322 } | |
1323 if (*compiled_sys != NUL) | |
1324 { | |
1325 MSG_PUTS("@"); | |
1326 MSG_PUTS(compiled_sys); | |
1327 } | |
1328 } | |
1329 #endif | |
1330 | |
1331 #ifdef FEAT_HUGE | |
1332 MSG_PUTS(_("\nHuge version ")); | |
1333 #else | |
1334 # ifdef FEAT_BIG | |
1335 MSG_PUTS(_("\nBig version ")); | |
1336 # else | |
1337 # ifdef FEAT_NORMAL | |
1338 MSG_PUTS(_("\nNormal version ")); | |
1339 # else | |
1340 # ifdef FEAT_SMALL | |
1341 MSG_PUTS(_("\nSmall version ")); | |
1342 # else | |
1343 MSG_PUTS(_("\nTiny version ")); | |
1344 # endif | |
1345 # endif | |
1346 # endif | |
1347 #endif | |
1348 #ifndef FEAT_GUI | |
1349 MSG_PUTS(_("without GUI.")); | |
1350 #else | |
1351 # ifdef FEAT_GUI_GTK | |
1352 # ifdef FEAT_GUI_GNOME | |
1353 MSG_PUTS(_("with GTK2-GNOME GUI.")); | |
1354 # else | |
1355 MSG_PUTS(_("with GTK2 GUI.")); | |
1356 # endif | |
1357 # else | |
1358 # ifdef FEAT_GUI_MOTIF | |
1359 MSG_PUTS(_("with X11-Motif GUI.")); | |
1360 # else | |
1361 # ifdef FEAT_GUI_ATHENA | |
1362 # ifdef FEAT_GUI_NEXTAW | |
1363 MSG_PUTS(_("with X11-neXtaw GUI.")); | |
1364 # else | |
1365 MSG_PUTS(_("with X11-Athena GUI.")); | |
1366 # endif | |
1367 # else | |
1368 # ifdef FEAT_GUI_PHOTON | |
1369 MSG_PUTS(_("with Photon GUI.")); | |
1370 # else | |
1371 # if defined(MSWIN) | |
1372 MSG_PUTS(_("with GUI.")); | |
1373 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1374 # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON |
7 | 1375 MSG_PUTS(_("with Carbon GUI.")); |
1376 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1377 # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX |
7 | 1378 MSG_PUTS(_("with Cocoa GUI.")); |
1379 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1380 # if defined(MACOS) |
7 | 1381 MSG_PUTS(_("with (classic) GUI.")); |
1382 # endif | |
1383 # endif | |
1384 # endif | |
1385 # endif | |
1386 # endif | |
1387 # endif | |
1388 # endif | |
1389 # endif | |
1390 #endif | |
1391 version_msg(_(" Features included (+) or not (-):\n")); | |
1392 | |
1393 /* print all the features */ | |
1394 for (i = 0; features[i] != NULL; ++i) | |
1395 { | |
1396 version_msg(features[i]); | |
1397 if (msg_col > 0) | |
1398 version_msg(" "); | |
1399 } | |
1400 | |
1401 version_msg("\n"); | |
1402 #ifdef SYS_VIMRC_FILE | |
1403 version_msg(_(" system vimrc file: \"")); | |
1404 version_msg(SYS_VIMRC_FILE); | |
1405 version_msg("\"\n"); | |
1406 #endif | |
1407 #ifdef USR_VIMRC_FILE | |
1408 version_msg(_(" user vimrc file: \"")); | |
1409 version_msg(USR_VIMRC_FILE); | |
1410 version_msg("\"\n"); | |
1411 #endif | |
1412 #ifdef USR_VIMRC_FILE2 | |
1413 version_msg(_(" 2nd user vimrc file: \"")); | |
1414 version_msg(USR_VIMRC_FILE2); | |
1415 version_msg("\"\n"); | |
1416 #endif | |
1417 #ifdef USR_VIMRC_FILE3 | |
1418 version_msg(_(" 3rd user vimrc file: \"")); | |
1419 version_msg(USR_VIMRC_FILE3); | |
1420 version_msg("\"\n"); | |
1421 #endif | |
1422 #ifdef USR_EXRC_FILE | |
1423 version_msg(_(" user exrc file: \"")); | |
1424 version_msg(USR_EXRC_FILE); | |
1425 version_msg("\"\n"); | |
1426 #endif | |
1427 #ifdef USR_EXRC_FILE2 | |
1428 version_msg(_(" 2nd user exrc file: \"")); | |
1429 version_msg(USR_EXRC_FILE2); | |
1430 version_msg("\"\n"); | |
1431 #endif | |
1432 #ifdef FEAT_GUI | |
1433 # ifdef SYS_GVIMRC_FILE | |
1434 version_msg(_(" system gvimrc file: \"")); | |
1435 version_msg(SYS_GVIMRC_FILE); | |
1436 version_msg("\"\n"); | |
1437 # endif | |
1438 version_msg(_(" user gvimrc file: \"")); | |
1439 version_msg(USR_GVIMRC_FILE); | |
1440 version_msg("\"\n"); | |
1441 # ifdef USR_GVIMRC_FILE2 | |
1442 version_msg(_("2nd user gvimrc file: \"")); | |
1443 version_msg(USR_GVIMRC_FILE2); | |
1444 version_msg("\"\n"); | |
1445 # endif | |
1446 # ifdef USR_GVIMRC_FILE3 | |
1447 version_msg(_("3rd user gvimrc file: \"")); | |
1448 version_msg(USR_GVIMRC_FILE3); | |
1449 version_msg("\"\n"); | |
1450 # endif | |
1451 #endif | |
1452 #ifdef FEAT_GUI | |
1453 # ifdef SYS_MENU_FILE | |
1454 version_msg(_(" system menu file: \"")); | |
1455 version_msg(SYS_MENU_FILE); | |
1456 version_msg("\"\n"); | |
1457 # endif | |
1458 #endif | |
1459 #ifdef HAVE_PATHDEF | |
1460 if (*default_vim_dir != NUL) | |
1461 { | |
1462 version_msg(_(" fall-back for $VIM: \"")); | |
1463 version_msg((char *)default_vim_dir); | |
1464 version_msg("\"\n"); | |
1465 } | |
1466 if (*default_vimruntime_dir != NUL) | |
1467 { | |
1468 version_msg(_(" f-b for $VIMRUNTIME: \"")); | |
1469 version_msg((char *)default_vimruntime_dir); | |
1470 version_msg("\"\n"); | |
1471 } | |
1472 version_msg(_("Compilation: ")); | |
1473 version_msg((char *)all_cflags); | |
1474 version_msg("\n"); | |
1475 #ifdef VMS | |
1476 if (*compiler_version != NUL) | |
1477 { | |
1478 version_msg(_("Compiler: ")); | |
1479 version_msg((char *)compiler_version); | |
1480 version_msg("\n"); | |
1481 } | |
1482 #endif | |
1483 version_msg(_("Linking: ")); | |
1484 version_msg((char *)all_lflags); | |
1485 #endif | |
1486 #ifdef DEBUG | |
1487 version_msg("\n"); | |
1488 version_msg(_(" DEBUG BUILD")); | |
1489 #endif | |
1490 } | |
1491 | |
1492 /* | |
1493 * Output a string for the version message. If it's going to wrap, output a | |
1494 * newline, unless the message is too long to fit on the screen anyway. | |
1495 */ | |
1496 static void | |
1497 version_msg(s) | |
1498 char *s; | |
1499 { | |
1500 int len = (int)STRLEN(s); | |
1501 | |
1502 if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns | |
1503 && *s != '\n') | |
1504 msg_putchar('\n'); | |
1505 if (!got_int) | |
1506 MSG_PUTS(s); | |
1507 } | |
1508 | |
1509 static void do_intro_line __ARGS((int row, char_u *mesg, int add_version, int attr)); | |
1510 | |
1511 /* | |
1512 * Give an introductory message about Vim. | |
1513 * Only used when starting Vim on an empty file, without a file name. | |
1514 * Or with the ":intro" command (for Sven :-). | |
1515 */ | |
1516 void | |
1517 intro_message(colon) | |
1518 int colon; /* TRUE for ":intro" */ | |
1519 { | |
1520 int i; | |
1521 int row; | |
1522 int blanklines; | |
1523 int sponsor; | |
1524 char *p; | |
1525 static char *(lines[]) = | |
1526 { | |
1527 N_("VIM - Vi IMproved"), | |
1528 "", | |
1529 N_("version "), | |
1530 N_("by Bram Moolenaar et al."), | |
1531 #ifdef MODIFIED_BY | |
1532 " ", | |
1533 #endif | |
1534 N_("Vim is open source and freely distributable"), | |
1535 "", | |
1536 N_("Help poor children in Uganda!"), | |
1537 N_("type :help iccf<Enter> for information "), | |
1538 "", | |
1539 N_("type :q<Enter> to exit "), | |
1540 N_("type :help<Enter> or <F1> for on-line help"), | |
26 | 1541 N_("type :help version7<Enter> for version info"), |
7 | 1542 NULL, |
1543 "", | |
1544 N_("Running in Vi compatible mode"), | |
1545 N_("type :set nocp<Enter> for Vim defaults"), | |
1546 N_("type :help cp-default<Enter> for info on this"), | |
1547 }; | |
1548 #ifdef FEAT_GUI | |
1549 static char *(gui_lines[]) = | |
1550 { | |
1551 NULL, | |
1552 NULL, | |
1553 NULL, | |
1554 NULL, | |
1555 #ifdef MODIFIED_BY | |
1556 NULL, | |
1557 #endif | |
1558 NULL, | |
1559 NULL, | |
1560 NULL, | |
1561 N_("menu Help->Orphans for information "), | |
1562 NULL, | |
1563 N_("Running modeless, typed text is inserted"), | |
1564 N_("menu Edit->Global Settings->Toggle Insert Mode "), | |
1565 N_(" for two modes "), | |
1566 NULL, | |
1567 NULL, | |
1568 NULL, | |
1569 N_("menu Edit->Global Settings->Toggle Vi Compatible"), | |
1570 N_(" for Vim defaults "), | |
1571 }; | |
1572 #endif | |
1573 | |
1574 /* blanklines = screen height - # message lines */ | |
1575 blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1); | |
1576 if (!p_cp) | |
1577 blanklines += 4; /* add 4 for not showing "Vi compatible" message */ | |
1578 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
1579 if (mch_windows95()) | |
1580 blanklines -= 3; /* subtract 3 for showing "Windows 95" message */ | |
1581 #endif | |
1582 | |
1583 #ifdef FEAT_WINDOWS | |
1584 /* Don't overwrite a statusline. Depends on 'cmdheight'. */ | |
1585 if (p_ls > 1) | |
1586 blanklines -= Rows - topframe->fr_height; | |
1587 #endif | |
1588 if (blanklines < 0) | |
1589 blanklines = 0; | |
1590 | |
1591 /* Show the sponsor and register message one out of four times, the Uganda | |
1592 * message two out of four times. */ | |
615 | 1593 sponsor = (int)time(NULL); |
7 | 1594 sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0); |
1595 | |
1596 /* start displaying the message lines after half of the blank lines */ | |
1597 row = blanklines / 2; | |
1598 if ((row >= 2 && Columns >= 50) || colon) | |
1599 { | |
1600 for (i = 0; i < (int)(sizeof(lines) / sizeof(char *)); ++i) | |
1601 { | |
1602 p = lines[i]; | |
1603 #ifdef FEAT_GUI | |
1604 if (p_im && gui.in_use && gui_lines[i] != NULL) | |
1605 p = gui_lines[i]; | |
1606 #endif | |
1607 if (p == NULL) | |
1608 { | |
1609 if (!p_cp) | |
1610 break; | |
1611 continue; | |
1612 } | |
1613 if (sponsor != 0) | |
1614 { | |
1615 if (strstr(p, "children") != NULL) | |
1616 p = sponsor < 0 | |
1617 ? N_("Sponsor Vim development!") | |
1618 : N_("Become a registered Vim user!"); | |
1619 else if (strstr(p, "iccf") != NULL) | |
1620 p = sponsor < 0 | |
1621 ? N_("type :help sponsor<Enter> for information ") | |
1622 : N_("type :help register<Enter> for information "); | |
1623 else if (strstr(p, "Orphans") != NULL) | |
1624 p = N_("menu Help->Sponsor/Register for information "); | |
1625 } | |
1626 if (*p != NUL) | |
1627 do_intro_line(row, (char_u *)_(p), i == 2, 0); | |
1628 ++row; | |
1629 } | |
1630 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
1631 if (mch_windows95()) | |
1632 { | |
1633 do_intro_line(++row, | |
1634 (char_u *)_("WARNING: Windows 95/98/ME detected"), | |
1635 FALSE, hl_attr(HLF_E)); | |
1636 do_intro_line(++row, | |
1637 (char_u *)_("type :help windows95<Enter> for info on this"), | |
1638 FALSE, 0); | |
1639 } | |
1640 #endif | |
1641 } | |
1642 | |
1643 /* Make the wait-return message appear just below the text. */ | |
1644 if (colon) | |
1645 msg_row = row; | |
1646 } | |
1647 | |
1648 static void | |
1649 do_intro_line(row, mesg, add_version, attr) | |
1650 int row; | |
1651 char_u *mesg; | |
1652 int add_version; | |
1653 int attr; | |
1654 { | |
1655 char_u vers[20]; | |
1656 int col; | |
1657 char_u *p; | |
1658 int l; | |
1659 int clen; | |
1660 #ifdef MODIFIED_BY | |
1661 # define MODBY_LEN 150 | |
1662 char_u modby[MODBY_LEN]; | |
1663 | |
1664 if (*mesg == ' ') | |
1665 { | |
1491 | 1666 vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1); |
7 | 1667 l = STRLEN(modby); |
1491 | 1668 vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1); |
7 | 1669 mesg = modby; |
1670 } | |
1671 #endif | |
1672 | |
1673 /* Center the message horizontally. */ | |
1674 col = vim_strsize(mesg); | |
1675 if (add_version) | |
1676 { | |
1677 STRCPY(vers, mediumVersion); | |
1678 if (highest_patch()) | |
1679 { | |
1680 /* Check for 9.9x or 9.9xx, alpha/beta version */ | |
2619 | 1681 if (isalpha((int)vers[3])) |
7 | 1682 { |
2619 | 1683 if (isalpha((int)vers[4])) |
7 | 1684 sprintf((char *)vers + 5, ".%d%s", highest_patch(), |
1685 mediumVersion + 5); | |
1686 else | |
1687 sprintf((char *)vers + 4, ".%d%s", highest_patch(), | |
1688 mediumVersion + 4); | |
1689 } | |
1690 else | |
1691 sprintf((char *)vers + 3, ".%d", highest_patch()); | |
1692 } | |
1693 col += (int)STRLEN(vers); | |
1694 } | |
1695 col = (Columns - col) / 2; | |
1696 if (col < 0) | |
1697 col = 0; | |
1698 | |
1699 /* Split up in parts to highlight <> items differently. */ | |
1700 for (p = mesg; *p != NUL; p += l) | |
1701 { | |
1702 clen = 0; | |
1703 for (l = 0; p[l] != NUL | |
1704 && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l) | |
1705 { | |
1706 #ifdef FEAT_MBYTE | |
1707 if (has_mbyte) | |
1708 { | |
1709 clen += ptr2cells(p + l); | |
474 | 1710 l += (*mb_ptr2len)(p + l) - 1; |
7 | 1711 } |
1712 else | |
1713 #endif | |
1714 clen += byte2cells(p[l]); | |
1715 } | |
1716 screen_puts_len(p, l, row, col, *p == '<' ? hl_attr(HLF_8) : attr); | |
1717 col += clen; | |
1718 } | |
1719 | |
1720 /* Add the version number to the version line. */ | |
1721 if (add_version) | |
1722 screen_puts(vers, row, col, 0); | |
1723 } | |
1724 | |
1725 /* | |
1726 * ":intro": clear screen, display intro screen and wait for return. | |
1727 */ | |
1728 void | |
1729 ex_intro(eap) | |
1876 | 1730 exarg_T *eap UNUSED; |
7 | 1731 { |
1732 screenclear(); | |
1733 intro_message(TRUE); | |
1734 wait_return(TRUE); | |
1735 } |