xref: /vim-8.2.3635/src/version.c (revision bc93cebb)
1 /* vi:set ts=8 sts=4 sw=4 noet:
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  *
20  * Differences between version 7.4 and 8.x can be found with ":help version8".
21  * Differences between version 6.4 and 7.x can be found with ":help version7".
22  * Differences between version 5.8 and 6.x can be found with ":help version6".
23  * Differences between version 4.x and 5.x can be found with ":help version5".
24  * Differences between version 3.0 and 4.x can be found with ":help version4".
25  * All the remarks about older versions have been removed, they are not very
26  * interesting.
27  */
28 
29 #include "version.h"
30 
31 char		*Version = VIM_VERSION_SHORT;
32 static char	*mediumVersion = VIM_VERSION_MEDIUM;
33 
34 #if defined(HAVE_DATE_TIME) || defined(PROTO)
35 # if (defined(VMS) && defined(VAXC)) || defined(PROTO)
36 char	longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__)
37 						      + sizeof(__TIME__) + 3];
38 
39     void
40 init_longVersion(void)
41 {
42     /*
43      * Construct the long version string.  Necessary because
44      * VAX C can't concatenate strings in the preprocessor.
45      */
46     strcpy(longVersion, VIM_VERSION_LONG_DATE);
47     strcat(longVersion, __DATE__);
48     strcat(longVersion, " ");
49     strcat(longVersion, __TIME__);
50     strcat(longVersion, ")");
51 }
52 
53 # else
54     void
55 init_longVersion(void)
56 {
57     char *date_time = __DATE__ " " __TIME__;
58     char *msg = _("%s (%s, compiled %s)");
59     size_t len = strlen(msg)
60 		+ strlen(VIM_VERSION_LONG_ONLY)
61 		+ strlen(VIM_VERSION_DATE_ONLY)
62 		+ strlen(date_time);
63 
64     longVersion = alloc(len);
65     if (longVersion == NULL)
66 	longVersion = VIM_VERSION_LONG;
67     else
68 	vim_snprintf(longVersion, len, msg,
69 		      VIM_VERSION_LONG_ONLY, VIM_VERSION_DATE_ONLY, date_time);
70 }
71 # endif
72 #else
73 char	*longVersion = VIM_VERSION_LONG;
74 
75     void
76 init_longVersion(void)
77 {
78     // nothing to do
79 }
80 #endif
81 
82 static char *(features[]) =
83 {
84 #ifdef HAVE_ACL
85 	"+acl",
86 #else
87 	"-acl",
88 #endif
89 #ifdef AMIGA		// only for Amiga systems
90 # ifdef FEAT_ARP
91 	"+ARP",
92 # else
93 	"-ARP",
94 # endif
95 #endif
96 #ifdef FEAT_ARABIC
97 	"+arabic",
98 #else
99 	"-arabic",
100 #endif
101 	"+autocmd",
102 #ifdef FEAT_AUTOCHDIR
103        "+autochdir",
104 #else
105        "-autochdir",
106 #endif
107 #ifdef FEAT_AUTOSERVERNAME
108 	"+autoservername",
109 #else
110 	"-autoservername",
111 #endif
112 #ifdef FEAT_BEVAL_GUI
113 	"+balloon_eval",
114 #else
115 	"-balloon_eval",
116 #endif
117 #ifdef FEAT_BEVAL_TERM
118 	"+balloon_eval_term",
119 #else
120 	"-balloon_eval_term",
121 #endif
122 #ifdef FEAT_BROWSE
123 	"+browse",
124 #else
125 	"-browse",
126 #endif
127 #ifdef NO_BUILTIN_TCAPS
128 	"-builtin_terms",
129 #endif
130 #ifdef SOME_BUILTIN_TCAPS
131 	"+builtin_terms",
132 #endif
133 #ifdef ALL_BUILTIN_TCAPS
134 	"++builtin_terms",
135 #endif
136 #ifdef FEAT_BYTEOFF
137 	"+byte_offset",
138 #else
139 	"-byte_offset",
140 #endif
141 #ifdef FEAT_JOB_CHANNEL
142 	"+channel",
143 #else
144 	"-channel",
145 #endif
146 #ifdef FEAT_CINDENT
147 	"+cindent",
148 #else
149 	"-cindent",
150 #endif
151 #ifdef FEAT_CLIENTSERVER
152 	"+clientserver",
153 #else
154 	"-clientserver",
155 #endif
156 #ifdef FEAT_CLIPBOARD
157 	"+clipboard",
158 #else
159 	"-clipboard",
160 #endif
161 	"+cmdline_compl",
162 	"+cmdline_hist",
163 #ifdef FEAT_CMDL_INFO
164 	"+cmdline_info",
165 #else
166 	"-cmdline_info",
167 #endif
168 	"+comments",
169 #ifdef FEAT_CONCEAL
170 	"+conceal",
171 #else
172 	"-conceal",
173 #endif
174 #ifdef FEAT_CRYPT
175 	"+cryptv",
176 #else
177 	"-cryptv",
178 #endif
179 #ifdef FEAT_CSCOPE
180 	"+cscope",
181 #else
182 	"-cscope",
183 #endif
184 	"+cursorbind",
185 #ifdef CURSOR_SHAPE
186 	"+cursorshape",
187 #else
188 	"-cursorshape",
189 #endif
190 #if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG)
191 	"+dialog_con_gui",
192 #else
193 # if defined(FEAT_CON_DIALOG)
194 	"+dialog_con",
195 # else
196 #  if defined(FEAT_GUI_DIALOG)
197 	"+dialog_gui",
198 #  else
199 	"-dialog",
200 #  endif
201 # endif
202 #endif
203 #ifdef FEAT_DIFF
204 	"+diff",
205 #else
206 	"-diff",
207 #endif
208 #ifdef FEAT_DIGRAPHS
209 	"+digraphs",
210 #else
211 	"-digraphs",
212 #endif
213 #ifdef FEAT_GUI_MSWIN
214 # ifdef FEAT_DIRECTX
215 	"+directx",
216 # else
217 	"-directx",
218 # endif
219 #endif
220 #ifdef FEAT_DND
221 	"+dnd",
222 #else
223 	"-dnd",
224 #endif
225 #ifdef EBCDIC
226 	"+ebcdic",
227 #else
228 	"-ebcdic",
229 #endif
230 #ifdef FEAT_EMACS_TAGS
231 	"+emacs_tags",
232 #else
233 	"-emacs_tags",
234 #endif
235 #ifdef FEAT_EVAL
236 	"+eval",
237 #else
238 	"-eval",
239 #endif
240 	"+ex_extra",
241 #ifdef FEAT_SEARCH_EXTRA
242 	"+extra_search",
243 #else
244 	"-extra_search",
245 #endif
246 	"-farsi",
247 #ifdef FEAT_SEARCHPATH
248 	"+file_in_path",
249 #else
250 	"-file_in_path",
251 #endif
252 #ifdef FEAT_FIND_ID
253 	"+find_in_path",
254 #else
255 	"-find_in_path",
256 #endif
257 #ifdef FEAT_FLOAT
258 	"+float",
259 #else
260 	"-float",
261 #endif
262 #ifdef FEAT_FOLDING
263 	"+folding",
264 #else
265 	"-folding",
266 #endif
267 #ifdef FEAT_FOOTER
268 	"+footer",
269 #else
270 	"-footer",
271 #endif
272 	    // only interesting on Unix systems
273 #if !defined(USE_SYSTEM) && defined(UNIX)
274 	"+fork()",
275 #endif
276 #ifdef FEAT_GETTEXT
277 # ifdef DYNAMIC_GETTEXT
278 	"+gettext/dyn",
279 # else
280 	"+gettext",
281 # endif
282 #else
283 	"-gettext",
284 #endif
285 	"-hangul_input",
286 #if (defined(HAVE_ICONV_H) && defined(USE_ICONV)) || defined(DYNAMIC_ICONV)
287 # ifdef DYNAMIC_ICONV
288 	"+iconv/dyn",
289 # else
290 	"+iconv",
291 # endif
292 #else
293 	"-iconv",
294 #endif
295 	"+insert_expand",
296 #ifdef FEAT_JOB_CHANNEL
297 	"+job",
298 #else
299 	"-job",
300 #endif
301 #ifdef FEAT_JUMPLIST
302 	"+jumplist",
303 #else
304 	"-jumplist",
305 #endif
306 #ifdef FEAT_KEYMAP
307 	"+keymap",
308 #else
309 	"-keymap",
310 #endif
311 #ifdef FEAT_EVAL
312 	"+lambda",
313 #else
314 	"-lambda",
315 #endif
316 #ifdef FEAT_LANGMAP
317 	"+langmap",
318 #else
319 	"-langmap",
320 #endif
321 #ifdef FEAT_LIBCALL
322 	"+libcall",
323 #else
324 	"-libcall",
325 #endif
326 #ifdef FEAT_LINEBREAK
327 	"+linebreak",
328 #else
329 	"-linebreak",
330 #endif
331 #ifdef FEAT_LISP
332 	"+lispindent",
333 #else
334 	"-lispindent",
335 #endif
336 	"+listcmds",
337 	"+localmap",
338 #ifdef FEAT_LUA
339 # ifdef DYNAMIC_LUA
340 	"+lua/dyn",
341 # else
342 	"+lua",
343 # endif
344 #else
345 	"-lua",
346 #endif
347 #ifdef FEAT_MENU
348 	"+menu",
349 #else
350 	"-menu",
351 #endif
352 #ifdef FEAT_SESSION
353 	"+mksession",
354 #else
355 	"-mksession",
356 #endif
357 	"+modify_fname",
358 	"+mouse",
359 #ifdef FEAT_MOUSESHAPE
360 	"+mouseshape",
361 #else
362 	"-mouseshape",
363 #endif
364 
365 #if defined(UNIX) || defined(VMS)
366 # ifdef FEAT_MOUSE_DEC
367 	"+mouse_dec",
368 # else
369 	"-mouse_dec",
370 # endif
371 # ifdef FEAT_MOUSE_GPM
372 	"+mouse_gpm",
373 # else
374 	"-mouse_gpm",
375 # endif
376 # ifdef FEAT_MOUSE_JSB
377 	"+mouse_jsbterm",
378 # else
379 	"-mouse_jsbterm",
380 # endif
381 # ifdef FEAT_MOUSE_NET
382 	"+mouse_netterm",
383 # else
384 	"-mouse_netterm",
385 # endif
386 #endif
387 
388 #ifdef __QNX__
389 # ifdef FEAT_MOUSE_PTERM
390 	"+mouse_pterm",
391 # else
392 	"-mouse_pterm",
393 # endif
394 #endif
395 
396 #if defined(UNIX) || defined(VMS)
397 	"+mouse_sgr",
398 # ifdef FEAT_SYSMOUSE
399 	"+mouse_sysmouse",
400 # else
401 	"-mouse_sysmouse",
402 # endif
403 # ifdef FEAT_MOUSE_URXVT
404 	"+mouse_urxvt",
405 # else
406 	"-mouse_urxvt",
407 # endif
408 	"+mouse_xterm",
409 #endif
410 
411 #ifdef FEAT_MBYTE_IME
412 # ifdef DYNAMIC_IME
413 	"+multi_byte_ime/dyn",
414 # else
415 	"+multi_byte_ime",
416 # endif
417 #else
418 	"+multi_byte",
419 #endif
420 #ifdef FEAT_MULTI_LANG
421 	"+multi_lang",
422 #else
423 	"-multi_lang",
424 #endif
425 #ifdef FEAT_MZSCHEME
426 # ifdef DYNAMIC_MZSCHEME
427 	"+mzscheme/dyn",
428 # else
429 	"+mzscheme",
430 # endif
431 #else
432 	"-mzscheme",
433 #endif
434 #ifdef FEAT_NETBEANS_INTG
435 	"+netbeans_intg",
436 #else
437 	"-netbeans_intg",
438 #endif
439 	"+num64",
440 #ifdef FEAT_GUI_MSWIN
441 # ifdef FEAT_OLE
442 	"+ole",
443 # else
444 	"-ole",
445 # endif
446 #endif
447 #ifdef FEAT_EVAL
448 	"+packages",
449 #else
450 	"-packages",
451 #endif
452 #ifdef FEAT_PATH_EXTRA
453 	"+path_extra",
454 #else
455 	"-path_extra",
456 #endif
457 #ifdef FEAT_PERL
458 # ifdef DYNAMIC_PERL
459 	"+perl/dyn",
460 # else
461 	"+perl",
462 # endif
463 #else
464 	"-perl",
465 #endif
466 #ifdef FEAT_PERSISTENT_UNDO
467 	"+persistent_undo",
468 #else
469 	"-persistent_undo",
470 #endif
471 #ifdef FEAT_PROP_POPUP
472 	"+popupwin",
473 #else
474 	"-popupwin",
475 #endif
476 #ifdef FEAT_PRINTER
477 # ifdef FEAT_POSTSCRIPT
478 	"+postscript",
479 # else
480 	"-postscript",
481 # endif
482 	"+printer",
483 #else
484 	"-printer",
485 #endif
486 #ifdef FEAT_PROFILE
487 	"+profile",
488 #else
489 	"-profile",
490 #endif
491 #ifdef FEAT_PYTHON
492 # ifdef DYNAMIC_PYTHON
493 	"+python/dyn",
494 # else
495 	"+python",
496 # endif
497 #else
498 	"-python",
499 #endif
500 #ifdef FEAT_PYTHON3
501 # ifdef DYNAMIC_PYTHON3
502 	"+python3/dyn",
503 # else
504 	"+python3",
505 # endif
506 #else
507 	"-python3",
508 #endif
509 #ifdef FEAT_QUICKFIX
510 	"+quickfix",
511 #else
512 	"-quickfix",
513 #endif
514 #ifdef FEAT_RELTIME
515 	"+reltime",
516 #else
517 	"-reltime",
518 #endif
519 #ifdef FEAT_RIGHTLEFT
520 	"+rightleft",
521 #else
522 	"-rightleft",
523 #endif
524 #ifdef FEAT_RUBY
525 # ifdef DYNAMIC_RUBY
526 	"+ruby/dyn",
527 # else
528 	"+ruby",
529 # endif
530 #else
531 	"-ruby",
532 #endif
533 	"+scrollbind",
534 #ifdef FEAT_SIGNS
535 	"+signs",
536 #else
537 	"-signs",
538 #endif
539 #ifdef FEAT_SMARTINDENT
540 	"+smartindent",
541 #else
542 	"-smartindent",
543 #endif
544 #ifdef FEAT_SOUND
545 	"+sound",
546 #else
547 	"-sound",
548 #endif
549 #ifdef FEAT_SPELL
550 	"+spell",
551 #else
552 	"-spell",
553 #endif
554 #ifdef STARTUPTIME
555 	"+startuptime",
556 #else
557 	"-startuptime",
558 #endif
559 #ifdef FEAT_STL_OPT
560 	"+statusline",
561 #else
562 	"-statusline",
563 #endif
564 	"-sun_workshop",
565 #ifdef FEAT_SYN_HL
566 	"+syntax",
567 #else
568 	"-syntax",
569 #endif
570 	    // only interesting on Unix systems
571 #if defined(USE_SYSTEM) && defined(UNIX)
572 	"+system()",
573 #endif
574 #ifdef FEAT_TAG_BINS
575 	"+tag_binary",
576 #else
577 	"-tag_binary",
578 #endif
579 	"-tag_old_static",
580 	"-tag_any_white",
581 #ifdef FEAT_TCL
582 # ifdef DYNAMIC_TCL
583 	"+tcl/dyn",
584 # else
585 	"+tcl",
586 # endif
587 #else
588 	"-tcl",
589 #endif
590 #ifdef FEAT_TERMGUICOLORS
591 	"+termguicolors",
592 #else
593 	"-termguicolors",
594 #endif
595 #ifdef FEAT_TERMINAL
596 	"+terminal",
597 #else
598 	"-terminal",
599 #endif
600 #if defined(UNIX)
601 // only Unix can have terminfo instead of termcap
602 # ifdef TERMINFO
603 	"+terminfo",
604 # else
605 	"-terminfo",
606 # endif
607 #endif
608 #ifdef FEAT_TERMRESPONSE
609 	"+termresponse",
610 #else
611 	"-termresponse",
612 #endif
613 #ifdef FEAT_TEXTOBJ
614 	"+textobjects",
615 #else
616 	"-textobjects",
617 #endif
618 #ifdef FEAT_PROP_POPUP
619 	"+textprop",
620 #else
621 	"-textprop",
622 #endif
623 #if !defined(UNIX)
624 // unix always includes termcap support
625 # ifdef HAVE_TGETENT
626 	"+tgetent",
627 # else
628 	"-tgetent",
629 # endif
630 #endif
631 #ifdef FEAT_TIMERS
632 	"+timers",
633 #else
634 	"-timers",
635 #endif
636 #ifdef FEAT_TITLE
637 	"+title",
638 #else
639 	"-title",
640 #endif
641 #ifdef FEAT_TOOLBAR
642 	"+toolbar",
643 #else
644 	"-toolbar",
645 #endif
646 	"+user_commands",
647 #ifdef FEAT_VARTABS
648 	"+vartabs",
649 #else
650 	"-vartabs",
651 #endif
652 	"+vertsplit",
653 	"+virtualedit",
654 	"+visual",
655 	"+visualextra",
656 #ifdef FEAT_VIMINFO
657 	"+viminfo",
658 #else
659 	"-viminfo",
660 #endif
661 	"+vreplace",
662 #ifdef MSWIN
663 # ifdef FEAT_VTP
664 	"+vtp",
665 # else
666 	"-vtp",
667 # endif
668 #endif
669 #ifdef FEAT_WILDIGN
670 	"+wildignore",
671 #else
672 	"-wildignore",
673 #endif
674 #ifdef FEAT_WILDMENU
675 	"+wildmenu",
676 #else
677 	"-wildmenu",
678 #endif
679 	"+windows",
680 #ifdef FEAT_WRITEBACKUP
681 	"+writebackup",
682 #else
683 	"-writebackup",
684 #endif
685 #if defined(UNIX) || defined(VMS)
686 # ifdef FEAT_X11
687 	"+X11",
688 # else
689 	"-X11",
690 # endif
691 #endif
692 #ifdef FEAT_XFONTSET
693 	"+xfontset",
694 #else
695 	"-xfontset",
696 #endif
697 #ifdef FEAT_XIM
698 	"+xim",
699 #else
700 	"-xim",
701 #endif
702 #ifdef MSWIN
703 # ifdef FEAT_XPM_W32
704 	"+xpm_w32",
705 # else
706 	"-xpm_w32",
707 # endif
708 #else
709 # ifdef HAVE_XPM
710 	"+xpm",
711 # else
712 	"-xpm",
713 # endif
714 #endif
715 #if defined(UNIX) || defined(VMS)
716 # ifdef USE_XSMP_INTERACT
717 	"+xsmp_interact",
718 # else
719 #  ifdef USE_XSMP
720 	"+xsmp",
721 #  else
722 	"-xsmp",
723 #  endif
724 # endif
725 # ifdef FEAT_XCLIPBOARD
726 	"+xterm_clipboard",
727 # else
728 	"-xterm_clipboard",
729 # endif
730 #endif
731 #ifdef FEAT_XTERM_SAVE
732 	"+xterm_save",
733 #else
734 	"-xterm_save",
735 #endif
736 	NULL
737 };
738 
739 static int included_patches[] =
740 {   /* Add new patch number below this line */
741 /**/
742     318,
743 /**/
744     317,
745 /**/
746     316,
747 /**/
748     315,
749 /**/
750     314,
751 /**/
752     313,
753 /**/
754     312,
755 /**/
756     311,
757 /**/
758     310,
759 /**/
760     309,
761 /**/
762     308,
763 /**/
764     307,
765 /**/
766     306,
767 /**/
768     305,
769 /**/
770     304,
771 /**/
772     303,
773 /**/
774     302,
775 /**/
776     301,
777 /**/
778     300,
779 /**/
780     299,
781 /**/
782     298,
783 /**/
784     297,
785 /**/
786     296,
787 /**/
788     295,
789 /**/
790     294,
791 /**/
792     293,
793 /**/
794     292,
795 /**/
796     291,
797 /**/
798     290,
799 /**/
800     289,
801 /**/
802     288,
803 /**/
804     287,
805 /**/
806     286,
807 /**/
808     285,
809 /**/
810     284,
811 /**/
812     283,
813 /**/
814     282,
815 /**/
816     281,
817 /**/
818     280,
819 /**/
820     279,
821 /**/
822     278,
823 /**/
824     277,
825 /**/
826     276,
827 /**/
828     275,
829 /**/
830     274,
831 /**/
832     273,
833 /**/
834     272,
835 /**/
836     271,
837 /**/
838     270,
839 /**/
840     269,
841 /**/
842     268,
843 /**/
844     267,
845 /**/
846     266,
847 /**/
848     265,
849 /**/
850     264,
851 /**/
852     263,
853 /**/
854     262,
855 /**/
856     261,
857 /**/
858     260,
859 /**/
860     259,
861 /**/
862     258,
863 /**/
864     257,
865 /**/
866     256,
867 /**/
868     255,
869 /**/
870     254,
871 /**/
872     253,
873 /**/
874     252,
875 /**/
876     251,
877 /**/
878     250,
879 /**/
880     249,
881 /**/
882     248,
883 /**/
884     247,
885 /**/
886     246,
887 /**/
888     245,
889 /**/
890     244,
891 /**/
892     243,
893 /**/
894     242,
895 /**/
896     241,
897 /**/
898     240,
899 /**/
900     239,
901 /**/
902     238,
903 /**/
904     237,
905 /**/
906     236,
907 /**/
908     235,
909 /**/
910     234,
911 /**/
912     233,
913 /**/
914     232,
915 /**/
916     231,
917 /**/
918     230,
919 /**/
920     229,
921 /**/
922     228,
923 /**/
924     227,
925 /**/
926     226,
927 /**/
928     225,
929 /**/
930     224,
931 /**/
932     223,
933 /**/
934     222,
935 /**/
936     221,
937 /**/
938     220,
939 /**/
940     219,
941 /**/
942     218,
943 /**/
944     217,
945 /**/
946     216,
947 /**/
948     215,
949 /**/
950     214,
951 /**/
952     213,
953 /**/
954     212,
955 /**/
956     211,
957 /**/
958     210,
959 /**/
960     209,
961 /**/
962     208,
963 /**/
964     207,
965 /**/
966     206,
967 /**/
968     205,
969 /**/
970     204,
971 /**/
972     203,
973 /**/
974     202,
975 /**/
976     201,
977 /**/
978     200,
979 /**/
980     199,
981 /**/
982     198,
983 /**/
984     197,
985 /**/
986     196,
987 /**/
988     195,
989 /**/
990     194,
991 /**/
992     193,
993 /**/
994     192,
995 /**/
996     191,
997 /**/
998     190,
999 /**/
1000     189,
1001 /**/
1002     188,
1003 /**/
1004     187,
1005 /**/
1006     186,
1007 /**/
1008     185,
1009 /**/
1010     184,
1011 /**/
1012     183,
1013 /**/
1014     182,
1015 /**/
1016     181,
1017 /**/
1018     180,
1019 /**/
1020     179,
1021 /**/
1022     178,
1023 /**/
1024     177,
1025 /**/
1026     176,
1027 /**/
1028     175,
1029 /**/
1030     174,
1031 /**/
1032     173,
1033 /**/
1034     172,
1035 /**/
1036     171,
1037 /**/
1038     170,
1039 /**/
1040     169,
1041 /**/
1042     168,
1043 /**/
1044     167,
1045 /**/
1046     166,
1047 /**/
1048     165,
1049 /**/
1050     164,
1051 /**/
1052     163,
1053 /**/
1054     162,
1055 /**/
1056     161,
1057 /**/
1058     160,
1059 /**/
1060     159,
1061 /**/
1062     158,
1063 /**/
1064     157,
1065 /**/
1066     156,
1067 /**/
1068     155,
1069 /**/
1070     154,
1071 /**/
1072     153,
1073 /**/
1074     152,
1075 /**/
1076     151,
1077 /**/
1078     150,
1079 /**/
1080     149,
1081 /**/
1082     148,
1083 /**/
1084     147,
1085 /**/
1086     146,
1087 /**/
1088     145,
1089 /**/
1090     144,
1091 /**/
1092     143,
1093 /**/
1094     142,
1095 /**/
1096     141,
1097 /**/
1098     140,
1099 /**/
1100     139,
1101 /**/
1102     138,
1103 /**/
1104     137,
1105 /**/
1106     136,
1107 /**/
1108     135,
1109 /**/
1110     134,
1111 /**/
1112     133,
1113 /**/
1114     132,
1115 /**/
1116     131,
1117 /**/
1118     130,
1119 /**/
1120     129,
1121 /**/
1122     128,
1123 /**/
1124     127,
1125 /**/
1126     126,
1127 /**/
1128     125,
1129 /**/
1130     124,
1131 /**/
1132     123,
1133 /**/
1134     122,
1135 /**/
1136     121,
1137 /**/
1138     120,
1139 /**/
1140     119,
1141 /**/
1142     118,
1143 /**/
1144     117,
1145 /**/
1146     116,
1147 /**/
1148     115,
1149 /**/
1150     114,
1151 /**/
1152     113,
1153 /**/
1154     112,
1155 /**/
1156     111,
1157 /**/
1158     110,
1159 /**/
1160     109,
1161 /**/
1162     108,
1163 /**/
1164     107,
1165 /**/
1166     106,
1167 /**/
1168     105,
1169 /**/
1170     104,
1171 /**/
1172     103,
1173 /**/
1174     102,
1175 /**/
1176     101,
1177 /**/
1178     100,
1179 /**/
1180     99,
1181 /**/
1182     98,
1183 /**/
1184     97,
1185 /**/
1186     96,
1187 /**/
1188     95,
1189 /**/
1190     94,
1191 /**/
1192     93,
1193 /**/
1194     92,
1195 /**/
1196     91,
1197 /**/
1198     90,
1199 /**/
1200     89,
1201 /**/
1202     88,
1203 /**/
1204     87,
1205 /**/
1206     86,
1207 /**/
1208     85,
1209 /**/
1210     84,
1211 /**/
1212     83,
1213 /**/
1214     82,
1215 /**/
1216     81,
1217 /**/
1218     80,
1219 /**/
1220     79,
1221 /**/
1222     78,
1223 /**/
1224     77,
1225 /**/
1226     76,
1227 /**/
1228     75,
1229 /**/
1230     74,
1231 /**/
1232     73,
1233 /**/
1234     72,
1235 /**/
1236     71,
1237 /**/
1238     70,
1239 /**/
1240     69,
1241 /**/
1242     68,
1243 /**/
1244     67,
1245 /**/
1246     66,
1247 /**/
1248     65,
1249 /**/
1250     64,
1251 /**/
1252     63,
1253 /**/
1254     62,
1255 /**/
1256     61,
1257 /**/
1258     60,
1259 /**/
1260     59,
1261 /**/
1262     58,
1263 /**/
1264     57,
1265 /**/
1266     56,
1267 /**/
1268     55,
1269 /**/
1270     54,
1271 /**/
1272     53,
1273 /**/
1274     52,
1275 /**/
1276     51,
1277 /**/
1278     50,
1279 /**/
1280     49,
1281 /**/
1282     48,
1283 /**/
1284     47,
1285 /**/
1286     46,
1287 /**/
1288     45,
1289 /**/
1290     44,
1291 /**/
1292     43,
1293 /**/
1294     42,
1295 /**/
1296     41,
1297 /**/
1298     40,
1299 /**/
1300     39,
1301 /**/
1302     38,
1303 /**/
1304     37,
1305 /**/
1306     36,
1307 /**/
1308     35,
1309 /**/
1310     34,
1311 /**/
1312     33,
1313 /**/
1314     32,
1315 /**/
1316     31,
1317 /**/
1318     30,
1319 /**/
1320     29,
1321 /**/
1322     28,
1323 /**/
1324     27,
1325 /**/
1326     26,
1327 /**/
1328     25,
1329 /**/
1330     24,
1331 /**/
1332     23,
1333 /**/
1334     22,
1335 /**/
1336     21,
1337 /**/
1338     20,
1339 /**/
1340     19,
1341 /**/
1342     18,
1343 /**/
1344     17,
1345 /**/
1346     16,
1347 /**/
1348     15,
1349 /**/
1350     14,
1351 /**/
1352     13,
1353 /**/
1354     12,
1355 /**/
1356     11,
1357 /**/
1358     10,
1359 /**/
1360     9,
1361 /**/
1362     8,
1363 /**/
1364     7,
1365 /**/
1366     6,
1367 /**/
1368     5,
1369 /**/
1370     4,
1371 /**/
1372     3,
1373 /**/
1374     2,
1375 /**/
1376     1,
1377 /**/
1378     0
1379 };
1380 
1381 /*
1382  * Place to put a short description when adding a feature with a patch.
1383  * Keep it short, e.g.,: "relative numbers", "persistent undo".
1384  * Also add a comment marker to separate the lines.
1385  * See the official Vim patches for the diff format: It must use a context of
1386  * one line only.  Create it by hand or use "diff -C2" and edit the patch.
1387  */
1388 static char *(extra_patches[]) =
1389 {   /* Add your patch description below this line */
1390 /**/
1391     NULL
1392 };
1393 
1394     int
1395 highest_patch(void)
1396 {
1397     // this relies on the highest patch number to be the first entry
1398     return included_patches[0];
1399 }
1400 
1401 #if defined(FEAT_EVAL) || defined(PROTO)
1402 /*
1403  * Return TRUE if patch "n" has been included.
1404  */
1405     int
1406 has_patch(int n)
1407 {
1408     int		i;
1409 
1410     for (i = 0; included_patches[i] != 0; ++i)
1411 	if (included_patches[i] == n)
1412 	    return TRUE;
1413     return FALSE;
1414 }
1415 #endif
1416 
1417     void
1418 ex_version(exarg_T *eap)
1419 {
1420     /*
1421      * Ignore a ":version 9.99" command.
1422      */
1423     if (*eap->arg == NUL)
1424     {
1425 	msg_putchar('\n');
1426 	list_version();
1427     }
1428 }
1429 
1430 /*
1431  * Output a string for the version message.  If it's going to wrap, output a
1432  * newline, unless the message is too long to fit on the screen anyway.
1433  * When "wrap" is TRUE wrap the string in [].
1434  */
1435     static void
1436 version_msg_wrap(char_u *s, int wrap)
1437 {
1438     int		len = (int)vim_strsize(s) + (wrap ? 2 : 0);
1439 
1440     if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns
1441 								&& *s != '\n')
1442 	msg_putchar('\n');
1443     if (!got_int)
1444     {
1445 	if (wrap)
1446 	    msg_puts("[");
1447 	msg_puts((char *)s);
1448 	if (wrap)
1449 	    msg_puts("]");
1450     }
1451 }
1452 
1453     static void
1454 version_msg(char *s)
1455 {
1456     version_msg_wrap((char_u *)s, FALSE);
1457 }
1458 
1459 /*
1460  * List all features aligned in columns, dictionary style.
1461  */
1462     static void
1463 list_features(void)
1464 {
1465     list_in_columns((char_u **)features, -1, -1);
1466 }
1467 
1468 /*
1469  * List string items nicely aligned in columns.
1470  * When "size" is < 0 then the last entry is marked with NULL.
1471  * The entry with index "current" is inclosed in [].
1472  */
1473     void
1474 list_in_columns(char_u **items, int size, int current)
1475 {
1476     int		i;
1477     int		ncol;
1478     int		nrow;
1479     int		cur_row = 1;
1480     int		item_count = 0;
1481     int		width = 0;
1482 #ifdef FEAT_SYN_HL
1483     int		use_highlight = (items == (char_u **)features);
1484 #endif
1485 
1486     // Find the length of the longest item, use that + 1 as the column
1487     // width.
1488     for (i = 0; size < 0 ? items[i] != NULL : i < size; ++i)
1489     {
1490 	int l = (int)vim_strsize(items[i]) + (i == current ? 2 : 0);
1491 
1492 	if (l > width)
1493 	    width = l;
1494 	++item_count;
1495     }
1496     width += 1;
1497 
1498     if (Columns < width)
1499     {
1500 	// Not enough screen columns - show one per line
1501 	for (i = 0; i < item_count; ++i)
1502 	{
1503 	    version_msg_wrap(items[i], i == current);
1504 	    if (msg_col > 0 && i < item_count - 1)
1505 		msg_putchar('\n');
1506 	}
1507 	return;
1508     }
1509 
1510     // The rightmost column doesn't need a separator.
1511     // Sacrifice it to fit in one more column if possible.
1512     ncol = (int) (Columns + 1) / width;
1513     nrow = item_count / ncol + (item_count % ncol ? 1 : 0);
1514 
1515     // "i" counts columns then rows.  "idx" counts rows then columns.
1516     for (i = 0; !got_int && i < nrow * ncol; ++i)
1517     {
1518 	int idx = (i / ncol) + (i % ncol) * nrow;
1519 
1520 	if (idx < item_count)
1521 	{
1522 	    int last_col = (i + 1) % ncol == 0;
1523 
1524 	    if (idx == current)
1525 		msg_putchar('[');
1526 #ifdef FEAT_SYN_HL
1527 	    if (use_highlight && items[idx][0] == '-')
1528 		msg_puts_attr((char *)items[idx], HL_ATTR(HLF_W));
1529 	    else
1530 #endif
1531 		msg_puts((char *)items[idx]);
1532 	    if (idx == current)
1533 		msg_putchar(']');
1534 	    if (last_col)
1535 	    {
1536 		if (msg_col > 0 && cur_row < nrow)
1537 		    msg_putchar('\n');
1538 		++cur_row;
1539 	    }
1540 	    else
1541 	    {
1542 		while (msg_col % width)
1543 		    msg_putchar(' ');
1544 	    }
1545 	}
1546 	else
1547 	{
1548 	    // this row is out of items, thus at the end of the row
1549 	    if (msg_col > 0)
1550 	    {
1551 		if (cur_row < nrow)
1552 		    msg_putchar('\n');
1553 		++cur_row;
1554 	    }
1555 	}
1556     }
1557 }
1558 
1559     void
1560 list_version(void)
1561 {
1562     int		i;
1563     int		first;
1564     char	*s = "";
1565 
1566     /*
1567      * When adding features here, don't forget to update the list of
1568      * internal variables in eval.c!
1569      */
1570     init_longVersion();
1571     msg(longVersion);
1572 #ifdef MSWIN
1573 # ifdef FEAT_GUI_MSWIN
1574 #  ifdef VIMDLL
1575 #   ifdef _WIN64
1576     msg_puts(_("\nMS-Windows 64-bit GUI/console version"));
1577 #   else
1578     msg_puts(_("\nMS-Windows 32-bit GUI/console version"));
1579 #   endif
1580 #  else
1581 #   ifdef _WIN64
1582     msg_puts(_("\nMS-Windows 64-bit GUI version"));
1583 #   else
1584     msg_puts(_("\nMS-Windows 32-bit GUI version"));
1585 #   endif
1586 #  endif
1587 #  ifdef FEAT_OLE
1588     msg_puts(_(" with OLE support"));
1589 #  endif
1590 # else
1591 #  ifdef _WIN64
1592     msg_puts(_("\nMS-Windows 64-bit console version"));
1593 #  else
1594     msg_puts(_("\nMS-Windows 32-bit console version"));
1595 #  endif
1596 # endif
1597 #endif
1598 #if defined(MACOS_X)
1599 # if defined(MACOS_X_DARWIN)
1600     msg_puts(_("\nmacOS version"));
1601 # else
1602     msg_puts(_("\nmacOS version w/o darwin feat."));
1603 # endif
1604 #endif
1605 
1606 #ifdef VMS
1607     msg_puts(_("\nOpenVMS version"));
1608 # ifdef HAVE_PATHDEF
1609     if (*compiled_arch != NUL)
1610     {
1611 	msg_puts(" - ");
1612 	msg_puts((char *)compiled_arch);
1613     }
1614 # endif
1615 
1616 #endif
1617 
1618     // Print the list of patch numbers if there is at least one.
1619     // Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45"
1620     if (included_patches[0] != 0)
1621     {
1622 	msg_puts(_("\nIncluded patches: "));
1623 	first = -1;
1624 	// find last one
1625 	for (i = 0; included_patches[i] != 0; ++i)
1626 	    ;
1627 	while (--i >= 0)
1628 	{
1629 	    if (first < 0)
1630 		first = included_patches[i];
1631 	    if (i == 0 || included_patches[i - 1] != included_patches[i] + 1)
1632 	    {
1633 		msg_puts(s);
1634 		s = ", ";
1635 		msg_outnum((long)first);
1636 		if (first != included_patches[i])
1637 		{
1638 		    msg_puts("-");
1639 		    msg_outnum((long)included_patches[i]);
1640 		}
1641 		first = -1;
1642 	    }
1643 	}
1644     }
1645 
1646     // Print the list of extra patch descriptions if there is at least one.
1647     if (extra_patches[0] != NULL)
1648     {
1649 	msg_puts(_("\nExtra patches: "));
1650 	s = "";
1651 	for (i = 0; extra_patches[i] != NULL; ++i)
1652 	{
1653 	    msg_puts(s);
1654 	    s = ", ";
1655 	    msg_puts(extra_patches[i]);
1656 	}
1657     }
1658 
1659 #ifdef MODIFIED_BY
1660     msg_puts("\n");
1661     msg_puts(_("Modified by "));
1662     msg_puts(MODIFIED_BY);
1663 #endif
1664 
1665 #ifdef HAVE_PATHDEF
1666     if (*compiled_user != NUL || *compiled_sys != NUL)
1667     {
1668 	msg_puts(_("\nCompiled "));
1669 	if (*compiled_user != NUL)
1670 	{
1671 	    msg_puts(_("by "));
1672 	    msg_puts((char *)compiled_user);
1673 	}
1674 	if (*compiled_sys != NUL)
1675 	{
1676 	    msg_puts("@");
1677 	    msg_puts((char *)compiled_sys);
1678 	}
1679     }
1680 #endif
1681 
1682 #ifdef FEAT_HUGE
1683     msg_puts(_("\nHuge version "));
1684 #else
1685 # ifdef FEAT_BIG
1686     msg_puts(_("\nBig version "));
1687 # else
1688 #  ifdef FEAT_NORMAL
1689     msg_puts(_("\nNormal version "));
1690 #  else
1691 #   ifdef FEAT_SMALL
1692     msg_puts(_("\nSmall version "));
1693 #   else
1694     msg_puts(_("\nTiny version "));
1695 #   endif
1696 #  endif
1697 # endif
1698 #endif
1699 #ifndef FEAT_GUI
1700     msg_puts(_("without GUI."));
1701 #else
1702 # ifdef FEAT_GUI_GTK
1703 #  ifdef USE_GTK3
1704     msg_puts(_("with GTK3 GUI."));
1705 #  else
1706 #   ifdef FEAT_GUI_GNOME
1707      msg_puts(_("with GTK2-GNOME GUI."));
1708 #   else
1709      msg_puts(_("with GTK2 GUI."));
1710 #   endif
1711 # endif
1712 # else
1713 #  ifdef FEAT_GUI_MOTIF
1714     msg_puts(_("with X11-Motif GUI."));
1715 #  else
1716 #   ifdef FEAT_GUI_ATHENA
1717 #    ifdef FEAT_GUI_NEXTAW
1718     msg_puts(_("with X11-neXtaw GUI."));
1719 #    else
1720     msg_puts(_("with X11-Athena GUI."));
1721 #    endif
1722 #   else
1723 #     ifdef FEAT_GUI_PHOTON
1724     msg_puts(_("with Photon GUI."));
1725 #     else
1726 #      if defined(MSWIN)
1727     msg_puts(_("with GUI."));
1728 #      else
1729 #	if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON
1730     msg_puts(_("with Carbon GUI."));
1731 #	else
1732 #	 if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX
1733     msg_puts(_("with Cocoa GUI."));
1734 #	 else
1735 #	 endif
1736 #	endif
1737 #      endif
1738 #    endif
1739 #   endif
1740 #  endif
1741 # endif
1742 #endif
1743     version_msg(_("  Features included (+) or not (-):\n"));
1744 
1745     list_features();
1746     if (msg_col > 0)
1747 	msg_putchar('\n');
1748 
1749 #ifdef SYS_VIMRC_FILE
1750     version_msg(_("   system vimrc file: \""));
1751     version_msg(SYS_VIMRC_FILE);
1752     version_msg("\"\n");
1753 #endif
1754 #ifdef USR_VIMRC_FILE
1755     version_msg(_("     user vimrc file: \""));
1756     version_msg(USR_VIMRC_FILE);
1757     version_msg("\"\n");
1758 #endif
1759 #ifdef USR_VIMRC_FILE2
1760     version_msg(_(" 2nd user vimrc file: \""));
1761     version_msg(USR_VIMRC_FILE2);
1762     version_msg("\"\n");
1763 #endif
1764 #ifdef USR_VIMRC_FILE3
1765     version_msg(_(" 3rd user vimrc file: \""));
1766     version_msg(USR_VIMRC_FILE3);
1767     version_msg("\"\n");
1768 #endif
1769 #ifdef USR_EXRC_FILE
1770     version_msg(_("      user exrc file: \""));
1771     version_msg(USR_EXRC_FILE);
1772     version_msg("\"\n");
1773 #endif
1774 #ifdef USR_EXRC_FILE2
1775     version_msg(_("  2nd user exrc file: \""));
1776     version_msg(USR_EXRC_FILE2);
1777     version_msg("\"\n");
1778 #endif
1779 #ifdef FEAT_GUI
1780 # ifdef SYS_GVIMRC_FILE
1781     version_msg(_("  system gvimrc file: \""));
1782     version_msg(SYS_GVIMRC_FILE);
1783     version_msg("\"\n");
1784 # endif
1785     version_msg(_("    user gvimrc file: \""));
1786     version_msg(USR_GVIMRC_FILE);
1787     version_msg("\"\n");
1788 # ifdef USR_GVIMRC_FILE2
1789     version_msg(_("2nd user gvimrc file: \""));
1790     version_msg(USR_GVIMRC_FILE2);
1791     version_msg("\"\n");
1792 # endif
1793 # ifdef USR_GVIMRC_FILE3
1794     version_msg(_("3rd user gvimrc file: \""));
1795     version_msg(USR_GVIMRC_FILE3);
1796     version_msg("\"\n");
1797 # endif
1798 #endif
1799     version_msg(_("       defaults file: \""));
1800     version_msg(VIM_DEFAULTS_FILE);
1801     version_msg("\"\n");
1802 #ifdef FEAT_GUI
1803 # ifdef SYS_MENU_FILE
1804     version_msg(_("    system menu file: \""));
1805     version_msg(SYS_MENU_FILE);
1806     version_msg("\"\n");
1807 # endif
1808 #endif
1809 #ifdef HAVE_PATHDEF
1810     if (*default_vim_dir != NUL)
1811     {
1812 	version_msg(_("  fall-back for $VIM: \""));
1813 	version_msg((char *)default_vim_dir);
1814 	version_msg("\"\n");
1815     }
1816     if (*default_vimruntime_dir != NUL)
1817     {
1818 	version_msg(_(" f-b for $VIMRUNTIME: \""));
1819 	version_msg((char *)default_vimruntime_dir);
1820 	version_msg("\"\n");
1821     }
1822     version_msg(_("Compilation: "));
1823     version_msg((char *)all_cflags);
1824     version_msg("\n");
1825 #ifdef VMS
1826     if (*compiler_version != NUL)
1827     {
1828 	version_msg(_("Compiler: "));
1829 	version_msg((char *)compiler_version);
1830 	version_msg("\n");
1831     }
1832 #endif
1833     version_msg(_("Linking: "));
1834     version_msg((char *)all_lflags);
1835 #endif
1836 #ifdef DEBUG
1837     version_msg("\n");
1838     version_msg(_("  DEBUG BUILD"));
1839 #endif
1840 }
1841 
1842 static void do_intro_line(int row, char_u *mesg, int add_version, int attr);
1843 
1844 /*
1845  * Show the intro message when not editing a file.
1846  */
1847     void
1848 maybe_intro_message(void)
1849 {
1850     if (BUFEMPTY()
1851 	    && curbuf->b_fname == NULL
1852 	    && firstwin->w_next == NULL
1853 	    && vim_strchr(p_shm, SHM_INTRO) == NULL)
1854 	intro_message(FALSE);
1855 }
1856 
1857 /*
1858  * Give an introductory message about Vim.
1859  * Only used when starting Vim on an empty file, without a file name.
1860  * Or with the ":intro" command (for Sven :-).
1861  */
1862     void
1863 intro_message(
1864     int		colon)		// TRUE for ":intro"
1865 {
1866     int		i;
1867     int		row;
1868     int		blanklines;
1869     int		sponsor;
1870     char	*p;
1871     static char	*(lines[]) =
1872     {
1873 	N_("VIM - Vi IMproved"),
1874 	"",
1875 	N_("version "),
1876 	N_("by Bram Moolenaar et al."),
1877 #ifdef MODIFIED_BY
1878 	" ",
1879 #endif
1880 	N_("Vim is open source and freely distributable"),
1881 	"",
1882 	N_("Help poor children in Uganda!"),
1883 	N_("type  :help iccf<Enter>       for information "),
1884 	"",
1885 	N_("type  :q<Enter>               to exit         "),
1886 	N_("type  :help<Enter>  or  <F1>  for on-line help"),
1887 	N_("type  :help version8<Enter>   for version info"),
1888 	NULL,
1889 	"",
1890 	N_("Running in Vi compatible mode"),
1891 	N_("type  :set nocp<Enter>        for Vim defaults"),
1892 	N_("type  :help cp-default<Enter> for info on this"),
1893     };
1894 #ifdef FEAT_GUI
1895     static char	*(gui_lines[]) =
1896     {
1897 	NULL,
1898 	NULL,
1899 	NULL,
1900 	NULL,
1901 #ifdef MODIFIED_BY
1902 	NULL,
1903 #endif
1904 	NULL,
1905 	NULL,
1906 	NULL,
1907 	N_("menu  Help->Orphans           for information    "),
1908 	NULL,
1909 	N_("Running modeless, typed text is inserted"),
1910 	N_("menu  Edit->Global Settings->Toggle Insert Mode  "),
1911 	N_("                              for two modes      "),
1912 	NULL,
1913 	NULL,
1914 	NULL,
1915 	N_("menu  Edit->Global Settings->Toggle Vi Compatible"),
1916 	N_("                              for Vim defaults   "),
1917     };
1918 #endif
1919 
1920     // blanklines = screen height - # message lines
1921     blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1);
1922     if (!p_cp)
1923 	blanklines += 4;  // add 4 for not showing "Vi compatible" message
1924 
1925     // Don't overwrite a statusline.  Depends on 'cmdheight'.
1926     if (p_ls > 1)
1927 	blanklines -= Rows - topframe->fr_height;
1928     if (blanklines < 0)
1929 	blanklines = 0;
1930 
1931     // Show the sponsor and register message one out of four times, the Uganda
1932     // message two out of four times.
1933     sponsor = (int)time(NULL);
1934     sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0);
1935 
1936     // start displaying the message lines after half of the blank lines
1937     row = blanklines / 2;
1938     if ((row >= 2 && Columns >= 50) || colon)
1939     {
1940 	for (i = 0; i < (int)(sizeof(lines) / sizeof(char *)); ++i)
1941 	{
1942 	    p = lines[i];
1943 #ifdef FEAT_GUI
1944 	    if (p_im && gui.in_use && gui_lines[i] != NULL)
1945 		p = gui_lines[i];
1946 #endif
1947 	    if (p == NULL)
1948 	    {
1949 		if (!p_cp)
1950 		    break;
1951 		continue;
1952 	    }
1953 	    if (sponsor != 0)
1954 	    {
1955 		if (strstr(p, "children") != NULL)
1956 		    p = sponsor < 0
1957 			? N_("Sponsor Vim development!")
1958 			: N_("Become a registered Vim user!");
1959 		else if (strstr(p, "iccf") != NULL)
1960 		    p = sponsor < 0
1961 			? N_("type  :help sponsor<Enter>    for information ")
1962 			: N_("type  :help register<Enter>   for information ");
1963 		else if (strstr(p, "Orphans") != NULL)
1964 		    p = N_("menu  Help->Sponsor/Register  for information    ");
1965 	    }
1966 	    if (*p != NUL)
1967 		do_intro_line(row, (char_u *)_(p), i == 2, 0);
1968 	    ++row;
1969 	}
1970     }
1971 
1972     // Make the wait-return message appear just below the text.
1973     if (colon)
1974 	msg_row = row;
1975 }
1976 
1977     static void
1978 do_intro_line(
1979     int		row,
1980     char_u	*mesg,
1981     int		add_version,
1982     int		attr)
1983 {
1984     char_u	vers[20];
1985     int		col;
1986     char_u	*p;
1987     int		l;
1988     int		clen;
1989 #ifdef MODIFIED_BY
1990 # define MODBY_LEN 150
1991     char_u	modby[MODBY_LEN];
1992 
1993     if (*mesg == ' ')
1994     {
1995 	vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1);
1996 	l = (int)STRLEN(modby);
1997 	vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1);
1998 	mesg = modby;
1999     }
2000 #endif
2001 
2002     // Center the message horizontally.
2003     col = vim_strsize(mesg);
2004     if (add_version)
2005     {
2006 	STRCPY(vers, mediumVersion);
2007 	if (highest_patch())
2008 	{
2009 	    // Check for 9.9x or 9.9xx, alpha/beta version
2010 	    if (isalpha((int)vers[3]))
2011 	    {
2012 		int len = (isalpha((int)vers[4])) ? 5 : 4;
2013 		sprintf((char *)vers + len, ".%d%s", highest_patch(),
2014 							 mediumVersion + len);
2015 	    }
2016 	    else
2017 		sprintf((char *)vers + 3, ".%d", highest_patch());
2018 	}
2019 	col += (int)STRLEN(vers);
2020     }
2021     col = (Columns - col) / 2;
2022     if (col < 0)
2023 	col = 0;
2024 
2025     // Split up in parts to highlight <> items differently.
2026     for (p = mesg; *p != NUL; p += l)
2027     {
2028 	clen = 0;
2029 	for (l = 0; p[l] != NUL
2030 			 && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l)
2031 	{
2032 	    if (has_mbyte)
2033 	    {
2034 		clen += ptr2cells(p + l);
2035 		l += (*mb_ptr2len)(p + l) - 1;
2036 	    }
2037 	    else
2038 		clen += byte2cells(p[l]);
2039 	}
2040 	screen_puts_len(p, l, row, col, *p == '<' ? HL_ATTR(HLF_8) : attr);
2041 	col += clen;
2042     }
2043 
2044     // Add the version number to the version line.
2045     if (add_version)
2046 	screen_puts(vers, row, col, 0);
2047 }
2048 
2049 /*
2050  * ":intro": clear screen, display intro screen and wait for return.
2051  */
2052     void
2053 ex_intro(exarg_T *eap UNUSED)
2054 {
2055     screenclear();
2056     intro_message(TRUE);
2057     wait_return(TRUE);
2058 }
2059