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