Mercurial > vim
annotate src/version.c @ 2841:664c1adcb909 v7.3.194
updated for version 7.3.194
Problem: When "b" is a symlink to directory "a", resolve("b/") doesn't
result in "a/". (ZyX)
Solution: Remove the trailing slash. (Jean-Rene David)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 19 May 2011 14:59:10 +0200 |
parents | e1c5f69de95b |
children | 8dbea5adc937 |
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 /**/ | |
2841 | 713 194, |
714 /**/ | |
2839 | 715 193, |
716 /**/ | |
2837 | 717 192, |
718 /**/ | |
2834 | 719 191, |
720 /**/ | |
2831 | 721 190, |
722 /**/ | |
2829 | 723 189, |
724 /**/ | |
2827 | 725 188, |
726 /**/ | |
2823 | 727 187, |
728 /**/ | |
2821 | 729 186, |
730 /**/ | |
2819 | 731 185, |
732 /**/ | |
2817 | 733 184, |
734 /**/ | |
2815 | 735 183, |
736 /**/ | |
2813 | 737 182, |
738 /**/ | |
2811 | 739 181, |
740 /**/ | |
2809 | 741 180, |
742 /**/ | |
2807 | 743 179, |
744 /**/ | |
2805 | 745 178, |
746 /**/ | |
2803 | 747 177, |
748 /**/ | |
2801 | 749 176, |
750 /**/ | |
2799 | 751 175, |
752 /**/ | |
2797 | 753 174, |
754 /**/ | |
2795 | 755 173, |
756 /**/ | |
2793 | 757 172, |
758 /**/ | |
2791 | 759 171, |
760 /**/ | |
2789 | 761 170, |
762 /**/ | |
2786 | 763 169, |
764 /**/ | |
2784 | 765 168, |
766 /**/ | |
2782 | 767 167, |
768 /**/ | |
2780 | 769 166, |
770 /**/ | |
2778 | 771 165, |
772 /**/ | |
2776 | 773 164, |
774 /**/ | |
2774 | 775 163, |
776 /**/ | |
2772 | 777 162, |
778 /**/ | |
2770 | 779 161, |
780 /**/ | |
2768 | 781 160, |
782 /**/ | |
2766 | 783 159, |
784 /**/ | |
2764 | 785 158, |
786 /**/ | |
2762 | 787 157, |
788 /**/ | |
2760 | 789 156, |
790 /**/ | |
2758 | 791 155, |
792 /**/ | |
2756 | 793 154, |
794 /**/ | |
2754 | 795 153, |
796 /**/ | |
2752 | 797 152, |
798 /**/ | |
2749 | 799 151, |
800 /**/ | |
2747 | 801 150, |
802 /**/ | |
2745 | 803 149, |
804 /**/ | |
2743 | 805 148, |
806 /**/ | |
2741 | 807 147, |
808 /**/ | |
2739 | 809 146, |
810 /**/ | |
2737 | 811 145, |
812 /**/ | |
2735 | 813 144, |
814 /**/ | |
2730 | 815 143, |
816 /**/ | |
2727 | 817 142, |
818 /**/ | |
2726 | 819 141, |
820 /**/ | |
2724 | 821 140, |
822 /**/ | |
2723 | 823 139, |
824 /**/ | |
2722 | 825 138, |
826 /**/ | |
2721 | 827 137, |
828 /**/ | |
2720 | 829 136, |
830 /**/ | |
2719 | 831 135, |
832 /**/ | |
2718 | 833 134, |
834 /**/ | |
2717 | 835 133, |
836 /**/ | |
2716 | 837 132, |
838 /**/ | |
2715 | 839 131, |
840 /**/ | |
2714 | 841 130, |
842 /**/ | |
2713 | 843 129, |
844 /**/ | |
2712 | 845 128, |
846 /**/ | |
2711 | 847 127, |
848 /**/ | |
2710 | 849 126, |
850 /**/ | |
2708 | 851 125, |
852 /**/ | |
2707 | 853 124, |
854 /**/ | |
2706 | 855 123, |
856 /**/ | |
2705 | 857 122, |
858 /**/ | |
2704 | 859 121, |
860 /**/ | |
2703 | 861 120, |
862 /**/ | |
2702 | 863 119, |
864 /**/ | |
2701 | 865 118, |
866 /**/ | |
2700 | 867 117, |
868 /**/ | |
2699 | 869 116, |
870 /**/ | |
2697 | 871 115, |
872 /**/ | |
2696 | 873 114, |
874 /**/ | |
2695 | 875 113, |
876 /**/ | |
2694 | 877 112, |
878 /**/ | |
2693 | 879 111, |
880 /**/ | |
2692 | 881 110, |
882 /**/ | |
2691 | 883 109, |
884 /**/ | |
2690 | 885 108, |
886 /**/ | |
2689 | 887 107, |
888 /**/ | |
2688 | 889 106, |
890 /**/ | |
2687 | 891 105, |
892 /**/ | |
2686 | 893 104, |
894 /**/ | |
2685 | 895 103, |
896 /**/ | |
2684 | 897 102, |
898 /**/ | |
2683 | 899 101, |
900 /**/ | |
2682 | 901 100, |
902 /**/ | |
2680 | 903 99, |
904 /**/ | |
2679 | 905 98, |
906 /**/ | |
2678 | 907 97, |
908 /**/ | |
2677 | 909 96, |
910 /**/ | |
2676 | 911 95, |
912 /**/ | |
2675 | 913 94, |
914 /**/ | |
2674 | 915 93, |
916 /**/ | |
2673 | 917 92, |
918 /**/ | |
2672 | 919 91, |
920 /**/ | |
2671 | 921 90, |
922 /**/ | |
2670 | 923 89, |
924 /**/ | |
2669 | 925 88, |
926 /**/ | |
2668 | 927 87, |
928 /**/ | |
2667 | 929 86, |
930 /**/ | |
2666 | 931 85, |
932 /**/ | |
2665 | 933 84, |
934 /**/ | |
2664 | 935 83, |
936 /**/ | |
2663 | 937 82, |
938 /**/ | |
2661 | 939 81, |
940 /**/ | |
2660 | 941 80, |
942 /**/ | |
2659 | 943 79, |
944 /**/ | |
2658 | 945 78, |
946 /**/ | |
2657 | 947 77, |
948 /**/ | |
2656 | 949 76, |
950 /**/ | |
2655 | 951 75, |
952 /**/ | |
2654 | 953 74, |
954 /**/ | |
2653 | 955 73, |
956 /**/ | |
2652 | 957 72, |
958 /**/ | |
2651 | 959 71, |
960 /**/ | |
2650 | 961 70, |
962 /**/ | |
2649 | 963 69, |
964 /**/ | |
2648 | 965 68, |
966 /**/ | |
2647 | 967 67, |
968 /**/ | |
2646 | 969 66, |
970 /**/ | |
2645 | 971 65, |
972 /**/ | |
2644 | 973 64, |
974 /**/ | |
2643 | 975 63, |
976 /**/ | |
2641 | 977 62, |
978 /**/ | |
2640 | 979 61, |
980 /**/ | |
2639 | 981 60, |
982 /**/ | |
2638 | 983 59, |
984 /**/ | |
2637 | 985 58, |
986 /**/ | |
2636 | 987 57, |
988 /**/ | |
2635 | 989 56, |
990 /**/ | |
2634 | 991 55, |
992 /**/ | |
2633 | 993 54, |
994 /**/ | |
2632 | 995 53, |
996 /**/ | |
2631 | 997 52, |
998 /**/ | |
2630 | 999 51, |
1000 /**/ | |
2629 | 1001 50, |
1002 /**/ | |
2628 | 1003 49, |
1004 /**/ | |
2627 | 1005 48, |
1006 /**/ | |
2626 | 1007 47, |
1008 /**/ | |
2624 | 1009 46, |
1010 /**/ | |
2623 | 1011 45, |
1012 /**/ | |
2622 | 1013 44, |
1014 /**/ | |
2621 | 1015 43, |
1016 /**/ | |
2620 | 1017 42, |
1018 /**/ | |
2619 | 1019 41, |
1020 /**/ | |
2618 | 1021 40, |
1022 /**/ | |
2617 | 1023 39, |
1024 /**/ | |
2616 | 1025 38, |
1026 /**/ | |
2615 | 1027 37, |
1028 /**/ | |
2614 | 1029 36, |
1030 /**/ | |
2613 | 1031 35, |
1032 /**/ | |
2612 | 1033 34, |
1034 /**/ | |
2611 | 1035 33, |
1036 /**/ | |
2610 | 1037 32, |
1038 /**/ | |
2609 | 1039 31, |
1040 /**/ | |
2607 | 1041 30, |
1042 /**/ | |
2606 | 1043 29, |
1044 /**/ | |
2605 | 1045 28, |
1046 /**/ | |
2604 | 1047 27, |
1048 /**/ | |
2603 | 1049 26, |
1050 /**/ | |
2602 | 1051 25, |
1052 /**/ | |
2601 | 1053 24, |
1054 /**/ | |
2600 | 1055 23, |
1056 /**/ | |
2599 | 1057 22, |
1058 /**/ | |
2598 | 1059 21, |
1060 /**/ | |
2597 | 1061 20, |
1062 /**/ | |
2595 | 1063 19, |
1064 /**/ | |
2594 | 1065 18, |
1066 /**/ | |
2593 | 1067 17, |
1068 /**/ | |
2592 | 1069 16, |
1070 /**/ | |
2591 | 1071 15, |
1072 /**/ | |
2590 | 1073 14, |
1074 /**/ | |
2589 | 1075 13, |
1076 /**/ | |
2588 | 1077 12, |
1078 /**/ | |
2586 | 1079 11, |
1080 /**/ | |
2585 | 1081 10, |
1082 /**/ | |
2584 | 1083 9, |
1084 /**/ | |
2583 | 1085 8, |
1086 /**/ | |
2582 | 1087 7, |
1088 /**/ | |
2580 | 1089 6, |
1090 /**/ | |
2579 | 1091 5, |
1092 /**/ | |
2578 | 1093 4, |
1094 /**/ | |
2165
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1095 3, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1096 /**/ |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1097 2, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1098 /**/ |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1099 1, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1100 /**/ |
7 | 1101 0 |
1102 }; | |
1103 | |
1760 | 1104 /* |
1105 * Place to put a short description when adding a feature with a patch. | |
1106 * Keep it short, e.g.,: "relative numbers", "persistent undo". | |
1107 * Also add a comment marker to separate the lines. | |
1108 * See the official Vim patches for the diff format: It must use a context of | |
1777 | 1109 * one line only. Create it by hand or use "diff -C2" and edit the patch. |
1760 | 1110 */ |
1111 static char *(extra_patches[]) = | |
1112 { /* Add your patch description below this line */ | |
1113 /**/ | |
1114 NULL | |
1115 }; | |
1116 | |
7 | 1117 int |
1118 highest_patch() | |
1119 { | |
1120 int i; | |
1121 int h = 0; | |
1122 | |
1123 for (i = 0; included_patches[i] != 0; ++i) | |
1124 if (included_patches[i] > h) | |
1125 h = included_patches[i]; | |
1126 return h; | |
1127 } | |
1128 | |
1129 #if defined(FEAT_EVAL) || defined(PROTO) | |
1130 /* | |
1131 * Return TRUE if patch "n" has been included. | |
1132 */ | |
1133 int | |
1134 has_patch(n) | |
1135 int n; | |
1136 { | |
1137 int i; | |
1138 | |
1139 for (i = 0; included_patches[i] != 0; ++i) | |
1140 if (included_patches[i] == n) | |
1141 return TRUE; | |
1142 return FALSE; | |
1143 } | |
1144 #endif | |
1145 | |
1146 void | |
1147 ex_version(eap) | |
1148 exarg_T *eap; | |
1149 { | |
1150 /* | |
1151 * Ignore a ":version 9.99" command. | |
1152 */ | |
1153 if (*eap->arg == NUL) | |
1154 { | |
1155 msg_putchar('\n'); | |
1156 list_version(); | |
1157 } | |
1158 } | |
1159 | |
1160 void | |
1161 list_version() | |
1162 { | |
1163 int i; | |
1164 int first; | |
1165 char *s = ""; | |
1166 | |
1167 /* | |
1168 * When adding features here, don't forget to update the list of | |
1169 * internal variables in eval.c! | |
1170 */ | |
1171 MSG(longVersion); | |
1172 #ifdef WIN3264 | |
1173 # ifdef FEAT_GUI_W32 | |
1174 # if defined(_MSC_VER) && (_MSC_VER <= 1010) | |
1175 /* Only MS VC 4.1 and earlier can do Win32s */ | |
1607 | 1176 MSG_PUTS(_("\nMS-Windows 16/32-bit GUI version")); |
7 | 1177 # else |
990 | 1178 # ifdef _WIN64 |
1607 | 1179 MSG_PUTS(_("\nMS-Windows 64-bit GUI version")); |
990 | 1180 # else |
1607 | 1181 MSG_PUTS(_("\nMS-Windows 32-bit GUI version")); |
990 | 1182 # endif |
7 | 1183 # endif |
1184 if (gui_is_win32s()) | |
1185 MSG_PUTS(_(" in Win32s mode")); | |
1186 # ifdef FEAT_OLE | |
1187 MSG_PUTS(_(" with OLE support")); | |
1188 # endif | |
1189 # else | |
1607 | 1190 # ifdef _WIN64 |
1191 MSG_PUTS(_("\nMS-Windows 64-bit console version")); | |
1192 # else | |
1193 MSG_PUTS(_("\nMS-Windows 32-bit console version")); | |
1194 # endif | |
7 | 1195 # endif |
1196 #endif | |
1197 #ifdef WIN16 | |
1607 | 1198 MSG_PUTS(_("\nMS-Windows 16-bit version")); |
7 | 1199 #endif |
1200 #ifdef MSDOS | |
1201 # ifdef DJGPP | |
1607 | 1202 MSG_PUTS(_("\n32-bit MS-DOS version")); |
7 | 1203 # else |
1607 | 1204 MSG_PUTS(_("\n16-bit MS-DOS version")); |
7 | 1205 # endif |
1206 #endif | |
1207 #ifdef MACOS | |
1208 # ifdef MACOS_X | |
1209 # ifdef MACOS_X_UNIX | |
1210 MSG_PUTS(_("\nMacOS X (unix) version")); | |
1211 # else | |
1212 MSG_PUTS(_("\nMacOS X version")); | |
1213 # endif | |
1214 #else | |
1215 MSG_PUTS(_("\nMacOS version")); | |
1216 # endif | |
1217 #endif | |
1218 | |
1219 #ifdef VMS | |
1705 | 1220 MSG_PUTS(_("\nOpenVMS version")); |
1045 | 1221 # ifdef HAVE_PATHDEF |
1222 if (*compiled_arch != NUL) | |
1223 { | |
1224 MSG_PUTS(" - "); | |
1225 MSG_PUTS(compiled_arch); | |
1226 } | |
1227 # endif | |
1228 | |
7 | 1229 #endif |
1230 | |
1231 /* Print the list of patch numbers if there is at least one. */ | |
1232 /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */ | |
1233 if (included_patches[0] != 0) | |
1234 { | |
1235 MSG_PUTS(_("\nIncluded patches: ")); | |
1236 first = -1; | |
1237 /* find last one */ | |
1238 for (i = 0; included_patches[i] != 0; ++i) | |
1239 ; | |
1240 while (--i >= 0) | |
1241 { | |
1242 if (first < 0) | |
1243 first = included_patches[i]; | |
1244 if (i == 0 || included_patches[i - 1] != included_patches[i] + 1) | |
1245 { | |
1246 MSG_PUTS(s); | |
1247 s = ", "; | |
1248 msg_outnum((long)first); | |
1249 if (first != included_patches[i]) | |
1250 { | |
1251 MSG_PUTS("-"); | |
1252 msg_outnum((long)included_patches[i]); | |
1253 } | |
1254 first = -1; | |
1255 } | |
1256 } | |
1257 } | |
1258 | |
1760 | 1259 /* Print the list of extra patch descriptions if there is at least one. */ |
1260 if (extra_patches[0] != NULL) | |
1261 { | |
1262 MSG_PUTS(_("\nExtra patches: ")); | |
1263 s = ""; | |
1264 for (i = 0; extra_patches[i] != NULL; ++i) | |
1265 { | |
1266 MSG_PUTS(s); | |
1267 s = ", "; | |
1268 MSG_PUTS(extra_patches[i]); | |
1269 } | |
1270 } | |
1271 | |
7 | 1272 #ifdef MODIFIED_BY |
1273 MSG_PUTS("\n"); | |
1274 MSG_PUTS(_("Modified by ")); | |
1275 MSG_PUTS(MODIFIED_BY); | |
1276 #endif | |
1277 | |
1278 #ifdef HAVE_PATHDEF | |
1279 if (*compiled_user != NUL || *compiled_sys != NUL) | |
1280 { | |
1281 MSG_PUTS(_("\nCompiled ")); | |
1282 if (*compiled_user != NUL) | |
1283 { | |
1284 MSG_PUTS(_("by ")); | |
1285 MSG_PUTS(compiled_user); | |
1286 } | |
1287 if (*compiled_sys != NUL) | |
1288 { | |
1289 MSG_PUTS("@"); | |
1290 MSG_PUTS(compiled_sys); | |
1291 } | |
1292 } | |
1293 #endif | |
1294 | |
1295 #ifdef FEAT_HUGE | |
1296 MSG_PUTS(_("\nHuge version ")); | |
1297 #else | |
1298 # ifdef FEAT_BIG | |
1299 MSG_PUTS(_("\nBig version ")); | |
1300 # else | |
1301 # ifdef FEAT_NORMAL | |
1302 MSG_PUTS(_("\nNormal version ")); | |
1303 # else | |
1304 # ifdef FEAT_SMALL | |
1305 MSG_PUTS(_("\nSmall version ")); | |
1306 # else | |
1307 MSG_PUTS(_("\nTiny version ")); | |
1308 # endif | |
1309 # endif | |
1310 # endif | |
1311 #endif | |
1312 #ifndef FEAT_GUI | |
1313 MSG_PUTS(_("without GUI.")); | |
1314 #else | |
1315 # ifdef FEAT_GUI_GTK | |
1316 # ifdef FEAT_GUI_GNOME | |
1317 MSG_PUTS(_("with GTK2-GNOME GUI.")); | |
1318 # else | |
1319 MSG_PUTS(_("with GTK2 GUI.")); | |
1320 # endif | |
1321 # else | |
1322 # ifdef FEAT_GUI_MOTIF | |
1323 MSG_PUTS(_("with X11-Motif GUI.")); | |
1324 # else | |
1325 # ifdef FEAT_GUI_ATHENA | |
1326 # ifdef FEAT_GUI_NEXTAW | |
1327 MSG_PUTS(_("with X11-neXtaw GUI.")); | |
1328 # else | |
1329 MSG_PUTS(_("with X11-Athena GUI.")); | |
1330 # endif | |
1331 # else | |
1332 # ifdef FEAT_GUI_PHOTON | |
1333 MSG_PUTS(_("with Photon GUI.")); | |
1334 # else | |
1335 # if defined(MSWIN) | |
1336 MSG_PUTS(_("with GUI.")); | |
1337 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1338 # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON |
7 | 1339 MSG_PUTS(_("with Carbon GUI.")); |
1340 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1341 # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX |
7 | 1342 MSG_PUTS(_("with Cocoa GUI.")); |
1343 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1344 # if defined(MACOS) |
7 | 1345 MSG_PUTS(_("with (classic) GUI.")); |
1346 # endif | |
1347 # endif | |
1348 # endif | |
1349 # endif | |
1350 # endif | |
1351 # endif | |
1352 # endif | |
1353 # endif | |
1354 #endif | |
1355 version_msg(_(" Features included (+) or not (-):\n")); | |
1356 | |
1357 /* print all the features */ | |
1358 for (i = 0; features[i] != NULL; ++i) | |
1359 { | |
1360 version_msg(features[i]); | |
1361 if (msg_col > 0) | |
1362 version_msg(" "); | |
1363 } | |
1364 | |
1365 version_msg("\n"); | |
1366 #ifdef SYS_VIMRC_FILE | |
1367 version_msg(_(" system vimrc file: \"")); | |
1368 version_msg(SYS_VIMRC_FILE); | |
1369 version_msg("\"\n"); | |
1370 #endif | |
1371 #ifdef USR_VIMRC_FILE | |
1372 version_msg(_(" user vimrc file: \"")); | |
1373 version_msg(USR_VIMRC_FILE); | |
1374 version_msg("\"\n"); | |
1375 #endif | |
1376 #ifdef USR_VIMRC_FILE2 | |
1377 version_msg(_(" 2nd user vimrc file: \"")); | |
1378 version_msg(USR_VIMRC_FILE2); | |
1379 version_msg("\"\n"); | |
1380 #endif | |
1381 #ifdef USR_VIMRC_FILE3 | |
1382 version_msg(_(" 3rd user vimrc file: \"")); | |
1383 version_msg(USR_VIMRC_FILE3); | |
1384 version_msg("\"\n"); | |
1385 #endif | |
1386 #ifdef USR_EXRC_FILE | |
1387 version_msg(_(" user exrc file: \"")); | |
1388 version_msg(USR_EXRC_FILE); | |
1389 version_msg("\"\n"); | |
1390 #endif | |
1391 #ifdef USR_EXRC_FILE2 | |
1392 version_msg(_(" 2nd user exrc file: \"")); | |
1393 version_msg(USR_EXRC_FILE2); | |
1394 version_msg("\"\n"); | |
1395 #endif | |
1396 #ifdef FEAT_GUI | |
1397 # ifdef SYS_GVIMRC_FILE | |
1398 version_msg(_(" system gvimrc file: \"")); | |
1399 version_msg(SYS_GVIMRC_FILE); | |
1400 version_msg("\"\n"); | |
1401 # endif | |
1402 version_msg(_(" user gvimrc file: \"")); | |
1403 version_msg(USR_GVIMRC_FILE); | |
1404 version_msg("\"\n"); | |
1405 # ifdef USR_GVIMRC_FILE2 | |
1406 version_msg(_("2nd user gvimrc file: \"")); | |
1407 version_msg(USR_GVIMRC_FILE2); | |
1408 version_msg("\"\n"); | |
1409 # endif | |
1410 # ifdef USR_GVIMRC_FILE3 | |
1411 version_msg(_("3rd user gvimrc file: \"")); | |
1412 version_msg(USR_GVIMRC_FILE3); | |
1413 version_msg("\"\n"); | |
1414 # endif | |
1415 #endif | |
1416 #ifdef FEAT_GUI | |
1417 # ifdef SYS_MENU_FILE | |
1418 version_msg(_(" system menu file: \"")); | |
1419 version_msg(SYS_MENU_FILE); | |
1420 version_msg("\"\n"); | |
1421 # endif | |
1422 #endif | |
1423 #ifdef HAVE_PATHDEF | |
1424 if (*default_vim_dir != NUL) | |
1425 { | |
1426 version_msg(_(" fall-back for $VIM: \"")); | |
1427 version_msg((char *)default_vim_dir); | |
1428 version_msg("\"\n"); | |
1429 } | |
1430 if (*default_vimruntime_dir != NUL) | |
1431 { | |
1432 version_msg(_(" f-b for $VIMRUNTIME: \"")); | |
1433 version_msg((char *)default_vimruntime_dir); | |
1434 version_msg("\"\n"); | |
1435 } | |
1436 version_msg(_("Compilation: ")); | |
1437 version_msg((char *)all_cflags); | |
1438 version_msg("\n"); | |
1439 #ifdef VMS | |
1440 if (*compiler_version != NUL) | |
1441 { | |
1442 version_msg(_("Compiler: ")); | |
1443 version_msg((char *)compiler_version); | |
1444 version_msg("\n"); | |
1445 } | |
1446 #endif | |
1447 version_msg(_("Linking: ")); | |
1448 version_msg((char *)all_lflags); | |
1449 #endif | |
1450 #ifdef DEBUG | |
1451 version_msg("\n"); | |
1452 version_msg(_(" DEBUG BUILD")); | |
1453 #endif | |
1454 } | |
1455 | |
1456 /* | |
1457 * Output a string for the version message. If it's going to wrap, output a | |
1458 * newline, unless the message is too long to fit on the screen anyway. | |
1459 */ | |
1460 static void | |
1461 version_msg(s) | |
1462 char *s; | |
1463 { | |
1464 int len = (int)STRLEN(s); | |
1465 | |
1466 if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns | |
1467 && *s != '\n') | |
1468 msg_putchar('\n'); | |
1469 if (!got_int) | |
1470 MSG_PUTS(s); | |
1471 } | |
1472 | |
1473 static void do_intro_line __ARGS((int row, char_u *mesg, int add_version, int attr)); | |
1474 | |
1475 /* | |
1476 * Give an introductory message about Vim. | |
1477 * Only used when starting Vim on an empty file, without a file name. | |
1478 * Or with the ":intro" command (for Sven :-). | |
1479 */ | |
1480 void | |
1481 intro_message(colon) | |
1482 int colon; /* TRUE for ":intro" */ | |
1483 { | |
1484 int i; | |
1485 int row; | |
1486 int blanklines; | |
1487 int sponsor; | |
1488 char *p; | |
1489 static char *(lines[]) = | |
1490 { | |
1491 N_("VIM - Vi IMproved"), | |
1492 "", | |
1493 N_("version "), | |
1494 N_("by Bram Moolenaar et al."), | |
1495 #ifdef MODIFIED_BY | |
1496 " ", | |
1497 #endif | |
1498 N_("Vim is open source and freely distributable"), | |
1499 "", | |
1500 N_("Help poor children in Uganda!"), | |
1501 N_("type :help iccf<Enter> for information "), | |
1502 "", | |
1503 N_("type :q<Enter> to exit "), | |
1504 N_("type :help<Enter> or <F1> for on-line help"), | |
26 | 1505 N_("type :help version7<Enter> for version info"), |
7 | 1506 NULL, |
1507 "", | |
1508 N_("Running in Vi compatible mode"), | |
1509 N_("type :set nocp<Enter> for Vim defaults"), | |
1510 N_("type :help cp-default<Enter> for info on this"), | |
1511 }; | |
1512 #ifdef FEAT_GUI | |
1513 static char *(gui_lines[]) = | |
1514 { | |
1515 NULL, | |
1516 NULL, | |
1517 NULL, | |
1518 NULL, | |
1519 #ifdef MODIFIED_BY | |
1520 NULL, | |
1521 #endif | |
1522 NULL, | |
1523 NULL, | |
1524 NULL, | |
1525 N_("menu Help->Orphans for information "), | |
1526 NULL, | |
1527 N_("Running modeless, typed text is inserted"), | |
1528 N_("menu Edit->Global Settings->Toggle Insert Mode "), | |
1529 N_(" for two modes "), | |
1530 NULL, | |
1531 NULL, | |
1532 NULL, | |
1533 N_("menu Edit->Global Settings->Toggle Vi Compatible"), | |
1534 N_(" for Vim defaults "), | |
1535 }; | |
1536 #endif | |
1537 | |
1538 /* blanklines = screen height - # message lines */ | |
1539 blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1); | |
1540 if (!p_cp) | |
1541 blanklines += 4; /* add 4 for not showing "Vi compatible" message */ | |
1542 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
1543 if (mch_windows95()) | |
1544 blanklines -= 3; /* subtract 3 for showing "Windows 95" message */ | |
1545 #endif | |
1546 | |
1547 #ifdef FEAT_WINDOWS | |
1548 /* Don't overwrite a statusline. Depends on 'cmdheight'. */ | |
1549 if (p_ls > 1) | |
1550 blanklines -= Rows - topframe->fr_height; | |
1551 #endif | |
1552 if (blanklines < 0) | |
1553 blanklines = 0; | |
1554 | |
1555 /* Show the sponsor and register message one out of four times, the Uganda | |
1556 * message two out of four times. */ | |
615 | 1557 sponsor = (int)time(NULL); |
7 | 1558 sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0); |
1559 | |
1560 /* start displaying the message lines after half of the blank lines */ | |
1561 row = blanklines / 2; | |
1562 if ((row >= 2 && Columns >= 50) || colon) | |
1563 { | |
1564 for (i = 0; i < (int)(sizeof(lines) / sizeof(char *)); ++i) | |
1565 { | |
1566 p = lines[i]; | |
1567 #ifdef FEAT_GUI | |
1568 if (p_im && gui.in_use && gui_lines[i] != NULL) | |
1569 p = gui_lines[i]; | |
1570 #endif | |
1571 if (p == NULL) | |
1572 { | |
1573 if (!p_cp) | |
1574 break; | |
1575 continue; | |
1576 } | |
1577 if (sponsor != 0) | |
1578 { | |
1579 if (strstr(p, "children") != NULL) | |
1580 p = sponsor < 0 | |
1581 ? N_("Sponsor Vim development!") | |
1582 : N_("Become a registered Vim user!"); | |
1583 else if (strstr(p, "iccf") != NULL) | |
1584 p = sponsor < 0 | |
1585 ? N_("type :help sponsor<Enter> for information ") | |
1586 : N_("type :help register<Enter> for information "); | |
1587 else if (strstr(p, "Orphans") != NULL) | |
1588 p = N_("menu Help->Sponsor/Register for information "); | |
1589 } | |
1590 if (*p != NUL) | |
1591 do_intro_line(row, (char_u *)_(p), i == 2, 0); | |
1592 ++row; | |
1593 } | |
1594 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
1595 if (mch_windows95()) | |
1596 { | |
1597 do_intro_line(++row, | |
1598 (char_u *)_("WARNING: Windows 95/98/ME detected"), | |
1599 FALSE, hl_attr(HLF_E)); | |
1600 do_intro_line(++row, | |
1601 (char_u *)_("type :help windows95<Enter> for info on this"), | |
1602 FALSE, 0); | |
1603 } | |
1604 #endif | |
1605 } | |
1606 | |
1607 /* Make the wait-return message appear just below the text. */ | |
1608 if (colon) | |
1609 msg_row = row; | |
1610 } | |
1611 | |
1612 static void | |
1613 do_intro_line(row, mesg, add_version, attr) | |
1614 int row; | |
1615 char_u *mesg; | |
1616 int add_version; | |
1617 int attr; | |
1618 { | |
1619 char_u vers[20]; | |
1620 int col; | |
1621 char_u *p; | |
1622 int l; | |
1623 int clen; | |
1624 #ifdef MODIFIED_BY | |
1625 # define MODBY_LEN 150 | |
1626 char_u modby[MODBY_LEN]; | |
1627 | |
1628 if (*mesg == ' ') | |
1629 { | |
1491 | 1630 vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1); |
7 | 1631 l = STRLEN(modby); |
1491 | 1632 vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1); |
7 | 1633 mesg = modby; |
1634 } | |
1635 #endif | |
1636 | |
1637 /* Center the message horizontally. */ | |
1638 col = vim_strsize(mesg); | |
1639 if (add_version) | |
1640 { | |
1641 STRCPY(vers, mediumVersion); | |
1642 if (highest_patch()) | |
1643 { | |
1644 /* Check for 9.9x or 9.9xx, alpha/beta version */ | |
2619 | 1645 if (isalpha((int)vers[3])) |
7 | 1646 { |
2619 | 1647 if (isalpha((int)vers[4])) |
7 | 1648 sprintf((char *)vers + 5, ".%d%s", highest_patch(), |
1649 mediumVersion + 5); | |
1650 else | |
1651 sprintf((char *)vers + 4, ".%d%s", highest_patch(), | |
1652 mediumVersion + 4); | |
1653 } | |
1654 else | |
1655 sprintf((char *)vers + 3, ".%d", highest_patch()); | |
1656 } | |
1657 col += (int)STRLEN(vers); | |
1658 } | |
1659 col = (Columns - col) / 2; | |
1660 if (col < 0) | |
1661 col = 0; | |
1662 | |
1663 /* Split up in parts to highlight <> items differently. */ | |
1664 for (p = mesg; *p != NUL; p += l) | |
1665 { | |
1666 clen = 0; | |
1667 for (l = 0; p[l] != NUL | |
1668 && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l) | |
1669 { | |
1670 #ifdef FEAT_MBYTE | |
1671 if (has_mbyte) | |
1672 { | |
1673 clen += ptr2cells(p + l); | |
474 | 1674 l += (*mb_ptr2len)(p + l) - 1; |
7 | 1675 } |
1676 else | |
1677 #endif | |
1678 clen += byte2cells(p[l]); | |
1679 } | |
1680 screen_puts_len(p, l, row, col, *p == '<' ? hl_attr(HLF_8) : attr); | |
1681 col += clen; | |
1682 } | |
1683 | |
1684 /* Add the version number to the version line. */ | |
1685 if (add_version) | |
1686 screen_puts(vers, row, col, 0); | |
1687 } | |
1688 | |
1689 /* | |
1690 * ":intro": clear screen, display intro screen and wait for return. | |
1691 */ | |
1692 void | |
1693 ex_intro(eap) | |
1876 | 1694 exarg_T *eap UNUSED; |
7 | 1695 { |
1696 screenclear(); | |
1697 intro_message(TRUE); | |
1698 wait_return(TRUE); | |
1699 } |