xref: /vim-8.2.3635/src/version.c (revision 94688b8a)
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 catenate 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 = (char *)alloc((unsigned)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 #ifdef FEAT_CMDL_COMPL
162 	"+cmdline_compl",
163 #else
164 	"-cmdline_compl",
165 #endif
166 #ifdef FEAT_CMDHIST
167 	"+cmdline_hist",
168 #else
169 	"-cmdline_hist",
170 #endif
171 #ifdef FEAT_CMDL_INFO
172 	"+cmdline_info",
173 #else
174 	"-cmdline_info",
175 #endif
176 #ifdef FEAT_COMMENTS
177 	"+comments",
178 #else
179 	"-comments",
180 #endif
181 #ifdef FEAT_CONCEAL
182 	"+conceal",
183 #else
184 	"-conceal",
185 #endif
186 #ifdef FEAT_CRYPT
187 	"+cryptv",
188 #else
189 	"-cryptv",
190 #endif
191 #ifdef FEAT_CSCOPE
192 	"+cscope",
193 #else
194 	"-cscope",
195 #endif
196 	"+cursorbind",
197 #ifdef CURSOR_SHAPE
198 	"+cursorshape",
199 #else
200 	"-cursorshape",
201 #endif
202 #if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG)
203 	"+dialog_con_gui",
204 #else
205 # if defined(FEAT_CON_DIALOG)
206 	"+dialog_con",
207 # else
208 #  if defined(FEAT_GUI_DIALOG)
209 	"+dialog_gui",
210 #  else
211 	"-dialog",
212 #  endif
213 # endif
214 #endif
215 #ifdef FEAT_DIFF
216 	"+diff",
217 #else
218 	"-diff",
219 #endif
220 #ifdef FEAT_DIGRAPHS
221 	"+digraphs",
222 #else
223 	"-digraphs",
224 #endif
225 #ifdef FEAT_GUI_W32
226 # ifdef FEAT_DIRECTX
227 	"+directx",
228 # else
229 	"-directx",
230 # endif
231 #endif
232 #ifdef FEAT_DND
233 	"+dnd",
234 #else
235 	"-dnd",
236 #endif
237 #ifdef EBCDIC
238 	"+ebcdic",
239 #else
240 	"-ebcdic",
241 #endif
242 #ifdef FEAT_EMACS_TAGS
243 	"+emacs_tags",
244 #else
245 	"-emacs_tags",
246 #endif
247 #ifdef FEAT_EVAL
248 	"+eval",
249 #else
250 	"-eval",
251 #endif
252 	"+ex_extra",
253 #ifdef FEAT_SEARCH_EXTRA
254 	"+extra_search",
255 #else
256 	"-extra_search",
257 #endif
258 #ifdef FEAT_FKMAP
259 	"+farsi",
260 #else
261 	"-farsi",
262 #endif
263 #ifdef FEAT_SEARCHPATH
264 	"+file_in_path",
265 #else
266 	"-file_in_path",
267 #endif
268 #ifdef FEAT_FIND_ID
269 	"+find_in_path",
270 #else
271 	"-find_in_path",
272 #endif
273 #ifdef FEAT_FLOAT
274 	"+float",
275 #else
276 	"-float",
277 #endif
278 #ifdef FEAT_FOLDING
279 	"+folding",
280 #else
281 	"-folding",
282 #endif
283 #ifdef FEAT_FOOTER
284 	"+footer",
285 #else
286 	"-footer",
287 #endif
288 	    /* only interesting on Unix systems */
289 #if !defined(USE_SYSTEM) && defined(UNIX)
290 	"+fork()",
291 #endif
292 #ifdef FEAT_GETTEXT
293 # ifdef DYNAMIC_GETTEXT
294 	"+gettext/dyn",
295 # else
296 	"+gettext",
297 # endif
298 #else
299 	"-gettext",
300 #endif
301 #ifdef FEAT_HANGULIN
302 	"+hangul_input",
303 #else
304 	"-hangul_input",
305 #endif
306 #if (defined(HAVE_ICONV_H) && defined(USE_ICONV)) || defined(DYNAMIC_ICONV)
307 # ifdef DYNAMIC_ICONV
308 	"+iconv/dyn",
309 # else
310 	"+iconv",
311 # endif
312 #else
313 	"-iconv",
314 #endif
315 #ifdef FEAT_INS_EXPAND
316 	"+insert_expand",
317 #else
318 	"-insert_expand",
319 #endif
320 #ifdef FEAT_JOB_CHANNEL
321 	"+job",
322 #else
323 	"-job",
324 #endif
325 #ifdef FEAT_JUMPLIST
326 	"+jumplist",
327 #else
328 	"-jumplist",
329 #endif
330 #ifdef FEAT_KEYMAP
331 	"+keymap",
332 #else
333 	"-keymap",
334 #endif
335 #ifdef FEAT_EVAL
336 	"+lambda",
337 #else
338 	"-lambda",
339 #endif
340 #ifdef FEAT_LANGMAP
341 	"+langmap",
342 #else
343 	"-langmap",
344 #endif
345 #ifdef FEAT_LIBCALL
346 	"+libcall",
347 #else
348 	"-libcall",
349 #endif
350 #ifdef FEAT_LINEBREAK
351 	"+linebreak",
352 #else
353 	"-linebreak",
354 #endif
355 #ifdef FEAT_LISP
356 	"+lispindent",
357 #else
358 	"-lispindent",
359 #endif
360 	"+listcmds",
361 #ifdef FEAT_LOCALMAP
362 	"+localmap",
363 #else
364 	"-localmap",
365 #endif
366 #ifdef FEAT_LUA
367 # ifdef DYNAMIC_LUA
368 	"+lua/dyn",
369 # else
370 	"+lua",
371 # endif
372 #else
373 	"-lua",
374 #endif
375 #ifdef FEAT_MENU
376 	"+menu",
377 #else
378 	"-menu",
379 #endif
380 #ifdef FEAT_SESSION
381 	"+mksession",
382 #else
383 	"-mksession",
384 #endif
385 #ifdef FEAT_MODIFY_FNAME
386 	"+modify_fname",
387 #else
388 	"-modify_fname",
389 #endif
390 #ifdef FEAT_MOUSE
391 	"+mouse",
392 #  ifdef FEAT_MOUSESHAPE
393 	"+mouseshape",
394 #  else
395 	"-mouseshape",
396 #  endif
397 # else
398 	"-mouse",
399 #endif
400 
401 #if defined(UNIX) || defined(VMS)
402 # ifdef FEAT_MOUSE_DEC
403 	"+mouse_dec",
404 # else
405 	"-mouse_dec",
406 # endif
407 # ifdef FEAT_MOUSE_GPM
408 	"+mouse_gpm",
409 # else
410 	"-mouse_gpm",
411 # endif
412 # ifdef FEAT_MOUSE_JSB
413 	"+mouse_jsbterm",
414 # else
415 	"-mouse_jsbterm",
416 # endif
417 # ifdef FEAT_MOUSE_NET
418 	"+mouse_netterm",
419 # else
420 	"-mouse_netterm",
421 # endif
422 #endif
423 
424 #ifdef __QNX__
425 # ifdef FEAT_MOUSE_PTERM
426 	"+mouse_pterm",
427 # else
428 	"-mouse_pterm",
429 # endif
430 #endif
431 
432 #if defined(UNIX) || defined(VMS)
433 # ifdef FEAT_MOUSE_SGR
434 	"+mouse_sgr",
435 # else
436 	"-mouse_sgr",
437 # endif
438 # ifdef FEAT_SYSMOUSE
439 	"+mouse_sysmouse",
440 # else
441 	"-mouse_sysmouse",
442 # endif
443 # ifdef FEAT_MOUSE_URXVT
444 	"+mouse_urxvt",
445 # else
446 	"-mouse_urxvt",
447 # endif
448 # ifdef FEAT_MOUSE_XTERM
449 	"+mouse_xterm",
450 # else
451 	"-mouse_xterm",
452 # endif
453 #endif
454 
455 #ifdef FEAT_MBYTE_IME
456 # ifdef DYNAMIC_IME
457 	"+multi_byte_ime/dyn",
458 # else
459 	"+multi_byte_ime",
460 # endif
461 #else
462 	"+multi_byte",
463 #endif
464 #ifdef FEAT_MULTI_LANG
465 	"+multi_lang",
466 #else
467 	"-multi_lang",
468 #endif
469 #ifdef FEAT_MZSCHEME
470 # ifdef DYNAMIC_MZSCHEME
471 	"+mzscheme/dyn",
472 # else
473 	"+mzscheme",
474 # endif
475 #else
476 	"-mzscheme",
477 #endif
478 #ifdef FEAT_NETBEANS_INTG
479 	"+netbeans_intg",
480 #else
481 	"-netbeans_intg",
482 #endif
483 #ifdef FEAT_NUM64
484 	"+num64",
485 #else
486 	"-num64",
487 #endif
488 #ifdef FEAT_GUI_W32
489 # ifdef FEAT_OLE
490 	"+ole",
491 # else
492 	"-ole",
493 # endif
494 #endif
495 #ifdef FEAT_EVAL
496 	"+packages",
497 #else
498 	"-packages",
499 #endif
500 #ifdef FEAT_PATH_EXTRA
501 	"+path_extra",
502 #else
503 	"-path_extra",
504 #endif
505 #ifdef FEAT_PERL
506 # ifdef DYNAMIC_PERL
507 	"+perl/dyn",
508 # else
509 	"+perl",
510 # endif
511 #else
512 	"-perl",
513 #endif
514 #ifdef FEAT_PERSISTENT_UNDO
515 	"+persistent_undo",
516 #else
517 	"-persistent_undo",
518 #endif
519 #ifdef FEAT_PRINTER
520 # ifdef FEAT_POSTSCRIPT
521 	"+postscript",
522 # else
523 	"-postscript",
524 # endif
525 	"+printer",
526 #else
527 	"-printer",
528 #endif
529 #ifdef FEAT_PROFILE
530 	"+profile",
531 #else
532 	"-profile",
533 #endif
534 #ifdef FEAT_PYTHON
535 # ifdef DYNAMIC_PYTHON
536 	"+python/dyn",
537 # else
538 	"+python",
539 # endif
540 #else
541 	"-python",
542 #endif
543 #ifdef FEAT_PYTHON3
544 # ifdef DYNAMIC_PYTHON3
545 	"+python3/dyn",
546 # else
547 	"+python3",
548 # endif
549 #else
550 	"-python3",
551 #endif
552 #ifdef FEAT_QUICKFIX
553 	"+quickfix",
554 #else
555 	"-quickfix",
556 #endif
557 #ifdef FEAT_RELTIME
558 	"+reltime",
559 #else
560 	"-reltime",
561 #endif
562 #ifdef FEAT_RIGHTLEFT
563 	"+rightleft",
564 #else
565 	"-rightleft",
566 #endif
567 #ifdef FEAT_RUBY
568 # ifdef DYNAMIC_RUBY
569 	"+ruby/dyn",
570 # else
571 	"+ruby",
572 # endif
573 #else
574 	"-ruby",
575 #endif
576 	"+scrollbind",
577 #ifdef FEAT_SIGNS
578 	"+signs",
579 #else
580 	"-signs",
581 #endif
582 #ifdef FEAT_SMARTINDENT
583 	"+smartindent",
584 #else
585 	"-smartindent",
586 #endif
587 #ifdef STARTUPTIME
588 	"+startuptime",
589 #else
590 	"-startuptime",
591 #endif
592 #ifdef FEAT_STL_OPT
593 	"+statusline",
594 #else
595 	"-statusline",
596 #endif
597 	"-sun_workshop",
598 #ifdef FEAT_SYN_HL
599 	"+syntax",
600 #else
601 	"-syntax",
602 #endif
603 	    /* only interesting on Unix systems */
604 #if defined(USE_SYSTEM) && defined(UNIX)
605 	"+system()",
606 #endif
607 #ifdef FEAT_TAG_BINS
608 	"+tag_binary",
609 #else
610 	"-tag_binary",
611 #endif
612 #ifdef FEAT_TAG_OLDSTATIC
613 	"+tag_old_static",
614 #else
615 	"-tag_old_static",
616 #endif
617 #ifdef FEAT_TAG_ANYWHITE
618 	"+tag_any_white",
619 #else
620 	"-tag_any_white",
621 #endif
622 #ifdef FEAT_TCL
623 # ifdef DYNAMIC_TCL
624 	"+tcl/dyn",
625 # else
626 	"+tcl",
627 # endif
628 #else
629 	"-tcl",
630 #endif
631 #ifdef FEAT_TERMGUICOLORS
632 	"+termguicolors",
633 #else
634 	"-termguicolors",
635 #endif
636 #ifdef FEAT_TERMINAL
637 	"+terminal",
638 #else
639 	"-terminal",
640 #endif
641 #if defined(UNIX)
642 /* only Unix can have terminfo instead of termcap */
643 # ifdef TERMINFO
644 	"+terminfo",
645 # else
646 	"-terminfo",
647 # endif
648 #endif
649 #ifdef FEAT_TERMRESPONSE
650 	"+termresponse",
651 #else
652 	"-termresponse",
653 #endif
654 #ifdef FEAT_TEXTOBJ
655 	"+textobjects",
656 #else
657 	"-textobjects",
658 #endif
659 #ifdef FEAT_TEXT_PROP
660 	"+textprop",
661 #else
662 	"-textprop",
663 #endif
664 #if !defined(UNIX)
665 /* unix always includes termcap support */
666 # ifdef HAVE_TGETENT
667 	"+tgetent",
668 # else
669 	"-tgetent",
670 # endif
671 #endif
672 #ifdef FEAT_TIMERS
673 	"+timers",
674 #else
675 	"-timers",
676 #endif
677 #ifdef FEAT_TITLE
678 	"+title",
679 #else
680 	"-title",
681 #endif
682 #ifdef FEAT_TOOLBAR
683 	"+toolbar",
684 #else
685 	"-toolbar",
686 #endif
687 #ifdef FEAT_USR_CMDS
688 	"+user_commands",
689 #else
690 	"-user_commands",
691 #endif
692 #ifdef FEAT_VARTABS
693 	"+vartabs",
694 #else
695 	"-vartabs",
696 #endif
697 	"+vertsplit",
698 	"+virtualedit",
699 	"+visual",
700 	"+visualextra",
701 #ifdef FEAT_VIMINFO
702 	"+viminfo",
703 #else
704 	"-viminfo",
705 #endif
706 	"+vreplace",
707 #ifdef WIN3264
708 # ifdef FEAT_VTP
709 	"+vtp",
710 # else
711 	"-vtp",
712 # endif
713 #endif
714 #ifdef FEAT_WILDIGN
715 	"+wildignore",
716 #else
717 	"-wildignore",
718 #endif
719 #ifdef FEAT_WILDMENU
720 	"+wildmenu",
721 #else
722 	"-wildmenu",
723 #endif
724 	"+windows",
725 #ifdef FEAT_WRITEBACKUP
726 	"+writebackup",
727 #else
728 	"-writebackup",
729 #endif
730 #if defined(UNIX) || defined(VMS)
731 # ifdef FEAT_X11
732 	"+X11",
733 # else
734 	"-X11",
735 # endif
736 #endif
737 #ifdef FEAT_XFONTSET
738 	"+xfontset",
739 #else
740 	"-xfontset",
741 #endif
742 #ifdef FEAT_XIM
743 	"+xim",
744 #else
745 	"-xim",
746 #endif
747 #ifdef WIN3264
748 # ifdef FEAT_XPM_W32
749 	"+xpm_w32",
750 # else
751 	"-xpm_w32",
752 # endif
753 #else
754 # ifdef HAVE_XPM
755 	"+xpm",
756 # else
757 	"-xpm",
758 # endif
759 #endif
760 #if defined(UNIX) || defined(VMS)
761 # ifdef USE_XSMP_INTERACT
762 	"+xsmp_interact",
763 # else
764 #  ifdef USE_XSMP
765 	"+xsmp",
766 #  else
767 	"-xsmp",
768 #  endif
769 # endif
770 # ifdef FEAT_XCLIPBOARD
771 	"+xterm_clipboard",
772 # else
773 	"-xterm_clipboard",
774 # endif
775 #endif
776 #ifdef FEAT_XTERM_SAVE
777 	"+xterm_save",
778 #else
779 	"-xterm_save",
780 #endif
781 	NULL
782 };
783 
784 static int included_patches[] =
785 {   /* Add new patch number below this line */
786 /**/
787     874,
788 /**/
789     873,
790 /**/
791     872,
792 /**/
793     871,
794 /**/
795     870,
796 /**/
797     869,
798 /**/
799     868,
800 /**/
801     867,
802 /**/
803     866,
804 /**/
805     865,
806 /**/
807     864,
808 /**/
809     863,
810 /**/
811     862,
812 /**/
813     861,
814 /**/
815     860,
816 /**/
817     859,
818 /**/
819     858,
820 /**/
821     857,
822 /**/
823     856,
824 /**/
825     855,
826 /**/
827     854,
828 /**/
829     853,
830 /**/
831     852,
832 /**/
833     851,
834 /**/
835     850,
836 /**/
837     849,
838 /**/
839     848,
840 /**/
841     847,
842 /**/
843     846,
844 /**/
845     845,
846 /**/
847     844,
848 /**/
849     843,
850 /**/
851     842,
852 /**/
853     841,
854 /**/
855     840,
856 /**/
857     839,
858 /**/
859     838,
860 /**/
861     837,
862 /**/
863     836,
864 /**/
865     835,
866 /**/
867     834,
868 /**/
869     833,
870 /**/
871     832,
872 /**/
873     831,
874 /**/
875     830,
876 /**/
877     829,
878 /**/
879     828,
880 /**/
881     827,
882 /**/
883     826,
884 /**/
885     825,
886 /**/
887     824,
888 /**/
889     823,
890 /**/
891     822,
892 /**/
893     821,
894 /**/
895     820,
896 /**/
897     819,
898 /**/
899     818,
900 /**/
901     817,
902 /**/
903     816,
904 /**/
905     815,
906 /**/
907     814,
908 /**/
909     813,
910 /**/
911     812,
912 /**/
913     811,
914 /**/
915     810,
916 /**/
917     809,
918 /**/
919     808,
920 /**/
921     807,
922 /**/
923     806,
924 /**/
925     805,
926 /**/
927     804,
928 /**/
929     803,
930 /**/
931     802,
932 /**/
933     801,
934 /**/
935     800,
936 /**/
937     799,
938 /**/
939     798,
940 /**/
941     797,
942 /**/
943     796,
944 /**/
945     795,
946 /**/
947     794,
948 /**/
949     793,
950 /**/
951     792,
952 /**/
953     791,
954 /**/
955     790,
956 /**/
957     789,
958 /**/
959     788,
960 /**/
961     787,
962 /**/
963     786,
964 /**/
965     785,
966 /**/
967     784,
968 /**/
969     783,
970 /**/
971     782,
972 /**/
973     781,
974 /**/
975     780,
976 /**/
977     779,
978 /**/
979     778,
980 /**/
981     777,
982 /**/
983     776,
984 /**/
985     775,
986 /**/
987     774,
988 /**/
989     773,
990 /**/
991     772,
992 /**/
993     771,
994 /**/
995     770,
996 /**/
997     769,
998 /**/
999     768,
1000 /**/
1001     767,
1002 /**/
1003     766,
1004 /**/
1005     765,
1006 /**/
1007     764,
1008 /**/
1009     763,
1010 /**/
1011     762,
1012 /**/
1013     761,
1014 /**/
1015     760,
1016 /**/
1017     759,
1018 /**/
1019     758,
1020 /**/
1021     757,
1022 /**/
1023     756,
1024 /**/
1025     755,
1026 /**/
1027     754,
1028 /**/
1029     753,
1030 /**/
1031     752,
1032 /**/
1033     751,
1034 /**/
1035     750,
1036 /**/
1037     749,
1038 /**/
1039     748,
1040 /**/
1041     747,
1042 /**/
1043     746,
1044 /**/
1045     745,
1046 /**/
1047     744,
1048 /**/
1049     743,
1050 /**/
1051     742,
1052 /**/
1053     741,
1054 /**/
1055     740,
1056 /**/
1057     739,
1058 /**/
1059     738,
1060 /**/
1061     737,
1062 /**/
1063     736,
1064 /**/
1065     735,
1066 /**/
1067     734,
1068 /**/
1069     733,
1070 /**/
1071     732,
1072 /**/
1073     731,
1074 /**/
1075     730,
1076 /**/
1077     729,
1078 /**/
1079     728,
1080 /**/
1081     727,
1082 /**/
1083     726,
1084 /**/
1085     725,
1086 /**/
1087     724,
1088 /**/
1089     723,
1090 /**/
1091     722,
1092 /**/
1093     721,
1094 /**/
1095     720,
1096 /**/
1097     719,
1098 /**/
1099     718,
1100 /**/
1101     717,
1102 /**/
1103     716,
1104 /**/
1105     715,
1106 /**/
1107     714,
1108 /**/
1109     713,
1110 /**/
1111     712,
1112 /**/
1113     711,
1114 /**/
1115     710,
1116 /**/
1117     709,
1118 /**/
1119     708,
1120 /**/
1121     707,
1122 /**/
1123     706,
1124 /**/
1125     705,
1126 /**/
1127     704,
1128 /**/
1129     703,
1130 /**/
1131     702,
1132 /**/
1133     701,
1134 /**/
1135     700,
1136 /**/
1137     699,
1138 /**/
1139     698,
1140 /**/
1141     697,
1142 /**/
1143     696,
1144 /**/
1145     695,
1146 /**/
1147     694,
1148 /**/
1149     693,
1150 /**/
1151     692,
1152 /**/
1153     691,
1154 /**/
1155     690,
1156 /**/
1157     689,
1158 /**/
1159     688,
1160 /**/
1161     687,
1162 /**/
1163     686,
1164 /**/
1165     685,
1166 /**/
1167     684,
1168 /**/
1169     683,
1170 /**/
1171     682,
1172 /**/
1173     681,
1174 /**/
1175     680,
1176 /**/
1177     679,
1178 /**/
1179     678,
1180 /**/
1181     677,
1182 /**/
1183     676,
1184 /**/
1185     675,
1186 /**/
1187     674,
1188 /**/
1189     673,
1190 /**/
1191     672,
1192 /**/
1193     671,
1194 /**/
1195     670,
1196 /**/
1197     669,
1198 /**/
1199     668,
1200 /**/
1201     667,
1202 /**/
1203     666,
1204 /**/
1205     665,
1206 /**/
1207     664,
1208 /**/
1209     663,
1210 /**/
1211     662,
1212 /**/
1213     661,
1214 /**/
1215     660,
1216 /**/
1217     659,
1218 /**/
1219     658,
1220 /**/
1221     657,
1222 /**/
1223     656,
1224 /**/
1225     655,
1226 /**/
1227     654,
1228 /**/
1229     653,
1230 /**/
1231     652,
1232 /**/
1233     651,
1234 /**/
1235     650,
1236 /**/
1237     649,
1238 /**/
1239     648,
1240 /**/
1241     647,
1242 /**/
1243     646,
1244 /**/
1245     645,
1246 /**/
1247     644,
1248 /**/
1249     643,
1250 /**/
1251     642,
1252 /**/
1253     641,
1254 /**/
1255     640,
1256 /**/
1257     639,
1258 /**/
1259     638,
1260 /**/
1261     637,
1262 /**/
1263     636,
1264 /**/
1265     635,
1266 /**/
1267     634,
1268 /**/
1269     633,
1270 /**/
1271     632,
1272 /**/
1273     631,
1274 /**/
1275     630,
1276 /**/
1277     629,
1278 /**/
1279     628,
1280 /**/
1281     627,
1282 /**/
1283     626,
1284 /**/
1285     625,
1286 /**/
1287     624,
1288 /**/
1289     623,
1290 /**/
1291     622,
1292 /**/
1293     621,
1294 /**/
1295     620,
1296 /**/
1297     619,
1298 /**/
1299     618,
1300 /**/
1301     617,
1302 /**/
1303     616,
1304 /**/
1305     615,
1306 /**/
1307     614,
1308 /**/
1309     613,
1310 /**/
1311     612,
1312 /**/
1313     611,
1314 /**/
1315     610,
1316 /**/
1317     609,
1318 /**/
1319     608,
1320 /**/
1321     607,
1322 /**/
1323     606,
1324 /**/
1325     605,
1326 /**/
1327     604,
1328 /**/
1329     603,
1330 /**/
1331     602,
1332 /**/
1333     601,
1334 /**/
1335     600,
1336 /**/
1337     599,
1338 /**/
1339     598,
1340 /**/
1341     597,
1342 /**/
1343     596,
1344 /**/
1345     595,
1346 /**/
1347     594,
1348 /**/
1349     593,
1350 /**/
1351     592,
1352 /**/
1353     591,
1354 /**/
1355     590,
1356 /**/
1357     589,
1358 /**/
1359     588,
1360 /**/
1361     587,
1362 /**/
1363     586,
1364 /**/
1365     585,
1366 /**/
1367     584,
1368 /**/
1369     583,
1370 /**/
1371     582,
1372 /**/
1373     581,
1374 /**/
1375     580,
1376 /**/
1377     579,
1378 /**/
1379     578,
1380 /**/
1381     577,
1382 /**/
1383     576,
1384 /**/
1385     575,
1386 /**/
1387     574,
1388 /**/
1389     573,
1390 /**/
1391     572,
1392 /**/
1393     571,
1394 /**/
1395     570,
1396 /**/
1397     569,
1398 /**/
1399     568,
1400 /**/
1401     567,
1402 /**/
1403     566,
1404 /**/
1405     565,
1406 /**/
1407     564,
1408 /**/
1409     563,
1410 /**/
1411     562,
1412 /**/
1413     561,
1414 /**/
1415     560,
1416 /**/
1417     559,
1418 /**/
1419     558,
1420 /**/
1421     557,
1422 /**/
1423     556,
1424 /**/
1425     555,
1426 /**/
1427     554,
1428 /**/
1429     553,
1430 /**/
1431     552,
1432 /**/
1433     551,
1434 /**/
1435     550,
1436 /**/
1437     549,
1438 /**/
1439     548,
1440 /**/
1441     547,
1442 /**/
1443     546,
1444 /**/
1445     545,
1446 /**/
1447     544,
1448 /**/
1449     543,
1450 /**/
1451     542,
1452 /**/
1453     541,
1454 /**/
1455     540,
1456 /**/
1457     539,
1458 /**/
1459     538,
1460 /**/
1461     537,
1462 /**/
1463     536,
1464 /**/
1465     535,
1466 /**/
1467     534,
1468 /**/
1469     533,
1470 /**/
1471     532,
1472 /**/
1473     531,
1474 /**/
1475     530,
1476 /**/
1477     529,
1478 /**/
1479     528,
1480 /**/
1481     527,
1482 /**/
1483     526,
1484 /**/
1485     525,
1486 /**/
1487     524,
1488 /**/
1489     523,
1490 /**/
1491     522,
1492 /**/
1493     521,
1494 /**/
1495     520,
1496 /**/
1497     519,
1498 /**/
1499     518,
1500 /**/
1501     517,
1502 /**/
1503     516,
1504 /**/
1505     515,
1506 /**/
1507     514,
1508 /**/
1509     513,
1510 /**/
1511     512,
1512 /**/
1513     511,
1514 /**/
1515     510,
1516 /**/
1517     509,
1518 /**/
1519     508,
1520 /**/
1521     507,
1522 /**/
1523     506,
1524 /**/
1525     505,
1526 /**/
1527     504,
1528 /**/
1529     503,
1530 /**/
1531     502,
1532 /**/
1533     501,
1534 /**/
1535     500,
1536 /**/
1537     499,
1538 /**/
1539     498,
1540 /**/
1541     497,
1542 /**/
1543     496,
1544 /**/
1545     495,
1546 /**/
1547     494,
1548 /**/
1549     493,
1550 /**/
1551     492,
1552 /**/
1553     491,
1554 /**/
1555     490,
1556 /**/
1557     489,
1558 /**/
1559     488,
1560 /**/
1561     487,
1562 /**/
1563     486,
1564 /**/
1565     485,
1566 /**/
1567     484,
1568 /**/
1569     483,
1570 /**/
1571     482,
1572 /**/
1573     481,
1574 /**/
1575     480,
1576 /**/
1577     479,
1578 /**/
1579     478,
1580 /**/
1581     477,
1582 /**/
1583     476,
1584 /**/
1585     475,
1586 /**/
1587     474,
1588 /**/
1589     473,
1590 /**/
1591     472,
1592 /**/
1593     471,
1594 /**/
1595     470,
1596 /**/
1597     469,
1598 /**/
1599     468,
1600 /**/
1601     467,
1602 /**/
1603     466,
1604 /**/
1605     465,
1606 /**/
1607     464,
1608 /**/
1609     463,
1610 /**/
1611     462,
1612 /**/
1613     461,
1614 /**/
1615     460,
1616 /**/
1617     459,
1618 /**/
1619     458,
1620 /**/
1621     457,
1622 /**/
1623     456,
1624 /**/
1625     455,
1626 /**/
1627     454,
1628 /**/
1629     453,
1630 /**/
1631     452,
1632 /**/
1633     451,
1634 /**/
1635     450,
1636 /**/
1637     449,
1638 /**/
1639     448,
1640 /**/
1641     447,
1642 /**/
1643     446,
1644 /**/
1645     445,
1646 /**/
1647     444,
1648 /**/
1649     443,
1650 /**/
1651     442,
1652 /**/
1653     441,
1654 /**/
1655     440,
1656 /**/
1657     439,
1658 /**/
1659     438,
1660 /**/
1661     437,
1662 /**/
1663     436,
1664 /**/
1665     435,
1666 /**/
1667     434,
1668 /**/
1669     433,
1670 /**/
1671     432,
1672 /**/
1673     431,
1674 /**/
1675     430,
1676 /**/
1677     429,
1678 /**/
1679     428,
1680 /**/
1681     427,
1682 /**/
1683     426,
1684 /**/
1685     425,
1686 /**/
1687     424,
1688 /**/
1689     423,
1690 /**/
1691     422,
1692 /**/
1693     421,
1694 /**/
1695     420,
1696 /**/
1697     419,
1698 /**/
1699     418,
1700 /**/
1701     417,
1702 /**/
1703     416,
1704 /**/
1705     415,
1706 /**/
1707     414,
1708 /**/
1709     413,
1710 /**/
1711     412,
1712 /**/
1713     411,
1714 /**/
1715     410,
1716 /**/
1717     409,
1718 /**/
1719     408,
1720 /**/
1721     407,
1722 /**/
1723     406,
1724 /**/
1725     405,
1726 /**/
1727     404,
1728 /**/
1729     403,
1730 /**/
1731     402,
1732 /**/
1733     401,
1734 /**/
1735     400,
1736 /**/
1737     399,
1738 /**/
1739     398,
1740 /**/
1741     397,
1742 /**/
1743     396,
1744 /**/
1745     395,
1746 /**/
1747     394,
1748 /**/
1749     393,
1750 /**/
1751     392,
1752 /**/
1753     391,
1754 /**/
1755     390,
1756 /**/
1757     389,
1758 /**/
1759     388,
1760 /**/
1761     387,
1762 /**/
1763     386,
1764 /**/
1765     385,
1766 /**/
1767     384,
1768 /**/
1769     383,
1770 /**/
1771     382,
1772 /**/
1773     381,
1774 /**/
1775     380,
1776 /**/
1777     379,
1778 /**/
1779     378,
1780 /**/
1781     377,
1782 /**/
1783     376,
1784 /**/
1785     375,
1786 /**/
1787     374,
1788 /**/
1789     373,
1790 /**/
1791     372,
1792 /**/
1793     371,
1794 /**/
1795     370,
1796 /**/
1797     369,
1798 /**/
1799     368,
1800 /**/
1801     367,
1802 /**/
1803     366,
1804 /**/
1805     365,
1806 /**/
1807     364,
1808 /**/
1809     363,
1810 /**/
1811     362,
1812 /**/
1813     361,
1814 /**/
1815     360,
1816 /**/
1817     359,
1818 /**/
1819     358,
1820 /**/
1821     357,
1822 /**/
1823     356,
1824 /**/
1825     355,
1826 /**/
1827     354,
1828 /**/
1829     353,
1830 /**/
1831     352,
1832 /**/
1833     351,
1834 /**/
1835     350,
1836 /**/
1837     349,
1838 /**/
1839     348,
1840 /**/
1841     347,
1842 /**/
1843     346,
1844 /**/
1845     345,
1846 /**/
1847     344,
1848 /**/
1849     343,
1850 /**/
1851     342,
1852 /**/
1853     341,
1854 /**/
1855     340,
1856 /**/
1857     339,
1858 /**/
1859     338,
1860 /**/
1861     337,
1862 /**/
1863     336,
1864 /**/
1865     335,
1866 /**/
1867     334,
1868 /**/
1869     333,
1870 /**/
1871     332,
1872 /**/
1873     331,
1874 /**/
1875     330,
1876 /**/
1877     329,
1878 /**/
1879     328,
1880 /**/
1881     327,
1882 /**/
1883     326,
1884 /**/
1885     325,
1886 /**/
1887     324,
1888 /**/
1889     323,
1890 /**/
1891     322,
1892 /**/
1893     321,
1894 /**/
1895     320,
1896 /**/
1897     319,
1898 /**/
1899     318,
1900 /**/
1901     317,
1902 /**/
1903     316,
1904 /**/
1905     315,
1906 /**/
1907     314,
1908 /**/
1909     313,
1910 /**/
1911     312,
1912 /**/
1913     311,
1914 /**/
1915     310,
1916 /**/
1917     309,
1918 /**/
1919     308,
1920 /**/
1921     307,
1922 /**/
1923     306,
1924 /**/
1925     305,
1926 /**/
1927     304,
1928 /**/
1929     303,
1930 /**/
1931     302,
1932 /**/
1933     301,
1934 /**/
1935     300,
1936 /**/
1937     299,
1938 /**/
1939     298,
1940 /**/
1941     297,
1942 /**/
1943     296,
1944 /**/
1945     295,
1946 /**/
1947     294,
1948 /**/
1949     293,
1950 /**/
1951     292,
1952 /**/
1953     291,
1954 /**/
1955     290,
1956 /**/
1957     289,
1958 /**/
1959     288,
1960 /**/
1961     287,
1962 /**/
1963     286,
1964 /**/
1965     285,
1966 /**/
1967     284,
1968 /**/
1969     283,
1970 /**/
1971     282,
1972 /**/
1973     281,
1974 /**/
1975     280,
1976 /**/
1977     279,
1978 /**/
1979     278,
1980 /**/
1981     277,
1982 /**/
1983     276,
1984 /**/
1985     275,
1986 /**/
1987     274,
1988 /**/
1989     273,
1990 /**/
1991     272,
1992 /**/
1993     271,
1994 /**/
1995     270,
1996 /**/
1997     269,
1998 /**/
1999     268,
2000 /**/
2001     267,
2002 /**/
2003     266,
2004 /**/
2005     265,
2006 /**/
2007     264,
2008 /**/
2009     263,
2010 /**/
2011     262,
2012 /**/
2013     261,
2014 /**/
2015     260,
2016 /**/
2017     259,
2018 /**/
2019     258,
2020 /**/
2021     257,
2022 /**/
2023     256,
2024 /**/
2025     255,
2026 /**/
2027     254,
2028 /**/
2029     253,
2030 /**/
2031     252,
2032 /**/
2033     251,
2034 /**/
2035     250,
2036 /**/
2037     249,
2038 /**/
2039     248,
2040 /**/
2041     247,
2042 /**/
2043     246,
2044 /**/
2045     245,
2046 /**/
2047     244,
2048 /**/
2049     243,
2050 /**/
2051     242,
2052 /**/
2053     241,
2054 /**/
2055     240,
2056 /**/
2057     239,
2058 /**/
2059     238,
2060 /**/
2061     237,
2062 /**/
2063     236,
2064 /**/
2065     235,
2066 /**/
2067     234,
2068 /**/
2069     233,
2070 /**/
2071     232,
2072 /**/
2073     231,
2074 /**/
2075     230,
2076 /**/
2077     229,
2078 /**/
2079     228,
2080 /**/
2081     227,
2082 /**/
2083     226,
2084 /**/
2085     225,
2086 /**/
2087     224,
2088 /**/
2089     223,
2090 /**/
2091     222,
2092 /**/
2093     221,
2094 /**/
2095     220,
2096 /**/
2097     219,
2098 /**/
2099     218,
2100 /**/
2101     217,
2102 /**/
2103     216,
2104 /**/
2105     215,
2106 /**/
2107     214,
2108 /**/
2109     213,
2110 /**/
2111     212,
2112 /**/
2113     211,
2114 /**/
2115     210,
2116 /**/
2117     209,
2118 /**/
2119     208,
2120 /**/
2121     207,
2122 /**/
2123     206,
2124 /**/
2125     205,
2126 /**/
2127     204,
2128 /**/
2129     203,
2130 /**/
2131     202,
2132 /**/
2133     201,
2134 /**/
2135     200,
2136 /**/
2137     199,
2138 /**/
2139     198,
2140 /**/
2141     197,
2142 /**/
2143     196,
2144 /**/
2145     195,
2146 /**/
2147     194,
2148 /**/
2149     193,
2150 /**/
2151     192,
2152 /**/
2153     191,
2154 /**/
2155     190,
2156 /**/
2157     189,
2158 /**/
2159     188,
2160 /**/
2161     187,
2162 /**/
2163     186,
2164 /**/
2165     185,
2166 /**/
2167     184,
2168 /**/
2169     183,
2170 /**/
2171     182,
2172 /**/
2173     181,
2174 /**/
2175     180,
2176 /**/
2177     179,
2178 /**/
2179     178,
2180 /**/
2181     177,
2182 /**/
2183     176,
2184 /**/
2185     175,
2186 /**/
2187     174,
2188 /**/
2189     173,
2190 /**/
2191     172,
2192 /**/
2193     171,
2194 /**/
2195     170,
2196 /**/
2197     169,
2198 /**/
2199     168,
2200 /**/
2201     167,
2202 /**/
2203     166,
2204 /**/
2205     165,
2206 /**/
2207     164,
2208 /**/
2209     163,
2210 /**/
2211     162,
2212 /**/
2213     161,
2214 /**/
2215     160,
2216 /**/
2217     159,
2218 /**/
2219     158,
2220 /**/
2221     157,
2222 /**/
2223     156,
2224 /**/
2225     155,
2226 /**/
2227     154,
2228 /**/
2229     153,
2230 /**/
2231     152,
2232 /**/
2233     151,
2234 /**/
2235     150,
2236 /**/
2237     149,
2238 /**/
2239     148,
2240 /**/
2241     147,
2242 /**/
2243     146,
2244 /**/
2245     145,
2246 /**/
2247     144,
2248 /**/
2249     143,
2250 /**/
2251     142,
2252 /**/
2253     141,
2254 /**/
2255     140,
2256 /**/
2257     139,
2258 /**/
2259     138,
2260 /**/
2261     137,
2262 /**/
2263     136,
2264 /**/
2265     135,
2266 /**/
2267     134,
2268 /**/
2269     133,
2270 /**/
2271     132,
2272 /**/
2273     131,
2274 /**/
2275     130,
2276 /**/
2277     129,
2278 /**/
2279     128,
2280 /**/
2281     127,
2282 /**/
2283     126,
2284 /**/
2285     125,
2286 /**/
2287     124,
2288 /**/
2289     123,
2290 /**/
2291     122,
2292 /**/
2293     121,
2294 /**/
2295     120,
2296 /**/
2297     119,
2298 /**/
2299     118,
2300 /**/
2301     117,
2302 /**/
2303     116,
2304 /**/
2305     115,
2306 /**/
2307     114,
2308 /**/
2309     113,
2310 /**/
2311     112,
2312 /**/
2313     111,
2314 /**/
2315     110,
2316 /**/
2317     109,
2318 /**/
2319     108,
2320 /**/
2321     107,
2322 /**/
2323     106,
2324 /**/
2325     105,
2326 /**/
2327     104,
2328 /**/
2329     103,
2330 /**/
2331     102,
2332 /**/
2333     101,
2334 /**/
2335     100,
2336 /**/
2337     99,
2338 /**/
2339     98,
2340 /**/
2341     97,
2342 /**/
2343     96,
2344 /**/
2345     95,
2346 /**/
2347     94,
2348 /**/
2349     93,
2350 /**/
2351     92,
2352 /**/
2353     91,
2354 /**/
2355     90,
2356 /**/
2357     89,
2358 /**/
2359     88,
2360 /**/
2361     87,
2362 /**/
2363     86,
2364 /**/
2365     85,
2366 /**/
2367     84,
2368 /**/
2369     83,
2370 /**/
2371     82,
2372 /**/
2373     81,
2374 /**/
2375     80,
2376 /**/
2377     79,
2378 /**/
2379     78,
2380 /**/
2381     77,
2382 /**/
2383     76,
2384 /**/
2385     75,
2386 /**/
2387     74,
2388 /**/
2389     73,
2390 /**/
2391     72,
2392 /**/
2393     71,
2394 /**/
2395     70,
2396 /**/
2397     69,
2398 /**/
2399     68,
2400 /**/
2401     67,
2402 /**/
2403     66,
2404 /**/
2405     65,
2406 /**/
2407     64,
2408 /**/
2409     63,
2410 /**/
2411     62,
2412 /**/
2413     61,
2414 /**/
2415     60,
2416 /**/
2417     59,
2418 /**/
2419     58,
2420 /**/
2421     57,
2422 /**/
2423     56,
2424 /**/
2425     55,
2426 /**/
2427     54,
2428 /**/
2429     53,
2430 /**/
2431     52,
2432 /**/
2433     51,
2434 /**/
2435     50,
2436 /**/
2437     49,
2438 /**/
2439     48,
2440 /**/
2441     47,
2442 /**/
2443     46,
2444 /**/
2445     45,
2446 /**/
2447     44,
2448 /**/
2449     43,
2450 /**/
2451     42,
2452 /**/
2453     41,
2454 /**/
2455     40,
2456 /**/
2457     39,
2458 /**/
2459     38,
2460 /**/
2461     37,
2462 /**/
2463     36,
2464 /**/
2465     35,
2466 /**/
2467     34,
2468 /**/
2469     33,
2470 /**/
2471     32,
2472 /**/
2473     31,
2474 /**/
2475     30,
2476 /**/
2477     29,
2478 /**/
2479     28,
2480 /**/
2481     27,
2482 /**/
2483     26,
2484 /**/
2485     25,
2486 /**/
2487     24,
2488 /**/
2489     23,
2490 /**/
2491     22,
2492 /**/
2493     21,
2494 /**/
2495     20,
2496 /**/
2497     19,
2498 /**/
2499     18,
2500 /**/
2501     17,
2502 /**/
2503     16,
2504 /**/
2505     15,
2506 /**/
2507     14,
2508 /**/
2509     13,
2510 /**/
2511     12,
2512 /**/
2513     11,
2514 /**/
2515     10,
2516 /**/
2517     9,
2518 /**/
2519     8,
2520 /**/
2521     7,
2522 /**/
2523     6,
2524 /**/
2525     5,
2526 /**/
2527     4,
2528 /**/
2529     3,
2530 /**/
2531     2,
2532 /**/
2533     1,
2534 /**/
2535     0
2536 };
2537 
2538 /*
2539  * Place to put a short description when adding a feature with a patch.
2540  * Keep it short, e.g.,: "relative numbers", "persistent undo".
2541  * Also add a comment marker to separate the lines.
2542  * See the official Vim patches for the diff format: It must use a context of
2543  * one line only.  Create it by hand or use "diff -C2" and edit the patch.
2544  */
2545 static char *(extra_patches[]) =
2546 {   /* Add your patch description below this line */
2547 /**/
2548     NULL
2549 };
2550 
2551     int
2552 highest_patch(void)
2553 {
2554     int		i;
2555     int		h = 0;
2556 
2557     for (i = 0; included_patches[i] != 0; ++i)
2558 	if (included_patches[i] > h)
2559 	    h = included_patches[i];
2560     return h;
2561 }
2562 
2563 #if defined(FEAT_EVAL) || defined(PROTO)
2564 /*
2565  * Return TRUE if patch "n" has been included.
2566  */
2567     int
2568 has_patch(int n)
2569 {
2570     int		i;
2571 
2572     for (i = 0; included_patches[i] != 0; ++i)
2573 	if (included_patches[i] == n)
2574 	    return TRUE;
2575     return FALSE;
2576 }
2577 #endif
2578 
2579     void
2580 ex_version(exarg_T *eap)
2581 {
2582     /*
2583      * Ignore a ":version 9.99" command.
2584      */
2585     if (*eap->arg == NUL)
2586     {
2587 	msg_putchar('\n');
2588 	list_version();
2589     }
2590 }
2591 
2592 /*
2593  * Output a string for the version message.  If it's going to wrap, output a
2594  * newline, unless the message is too long to fit on the screen anyway.
2595  * When "wrap" is TRUE wrap the string in [].
2596  */
2597     static void
2598 version_msg_wrap(char_u *s, int wrap)
2599 {
2600     int		len = (int)vim_strsize(s) + (wrap ? 2 : 0);
2601 
2602     if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns
2603 								&& *s != '\n')
2604 	msg_putchar('\n');
2605     if (!got_int)
2606     {
2607 	if (wrap)
2608 	    msg_puts("[");
2609 	msg_puts((char *)s);
2610 	if (wrap)
2611 	    msg_puts("]");
2612     }
2613 }
2614 
2615     static void
2616 version_msg(char *s)
2617 {
2618     version_msg_wrap((char_u *)s, FALSE);
2619 }
2620 
2621 /*
2622  * List all features aligned in columns, dictionary style.
2623  */
2624     static void
2625 list_features(void)
2626 {
2627     list_in_columns((char_u **)features, -1, -1);
2628 }
2629 
2630 /*
2631  * List string items nicely aligned in columns.
2632  * When "size" is < 0 then the last entry is marked with NULL.
2633  * The entry with index "current" is inclosed in [].
2634  */
2635     void
2636 list_in_columns(char_u **items, int size, int current)
2637 {
2638     int		i;
2639     int		ncol;
2640     int		nrow;
2641     int		item_count = 0;
2642     int		width = 0;
2643 #ifdef FEAT_SYN_HL
2644     int		use_highlight = (items == (char_u **)features);
2645 #endif
2646 
2647     /* Find the length of the longest item, use that + 1 as the column
2648      * width. */
2649     for (i = 0; size < 0 ? items[i] != NULL : i < size; ++i)
2650     {
2651 	int l = (int)vim_strsize(items[i]) + (i == current ? 2 : 0);
2652 
2653 	if (l > width)
2654 	    width = l;
2655 	++item_count;
2656     }
2657     width += 1;
2658 
2659     if (Columns < width)
2660     {
2661 	/* Not enough screen columns - show one per line */
2662 	for (i = 0; i < item_count; ++i)
2663 	{
2664 	    version_msg_wrap(items[i], i == current);
2665 	    if (msg_col > 0)
2666 		msg_putchar('\n');
2667 	}
2668 	return;
2669     }
2670 
2671     /* The rightmost column doesn't need a separator.
2672      * Sacrifice it to fit in one more column if possible. */
2673     ncol = (int) (Columns + 1) / width;
2674     nrow = item_count / ncol + (item_count % ncol ? 1 : 0);
2675 
2676     /* i counts columns then rows.  idx counts rows then columns. */
2677     for (i = 0; !got_int && i < nrow * ncol; ++i)
2678     {
2679 	int idx = (i / ncol) + (i % ncol) * nrow;
2680 
2681 	if (idx < item_count)
2682 	{
2683 	    int last_col = (i + 1) % ncol == 0;
2684 
2685 	    if (idx == current)
2686 		msg_putchar('[');
2687 #ifdef FEAT_SYN_HL
2688 	    if (use_highlight && items[idx][0] == '-')
2689 		msg_puts_attr((char *)items[idx], HL_ATTR(HLF_W));
2690 	    else
2691 #endif
2692 		msg_puts((char *)items[idx]);
2693 	    if (idx == current)
2694 		msg_putchar(']');
2695 	    if (last_col)
2696 	    {
2697 		if (msg_col > 0)
2698 		    msg_putchar('\n');
2699 	    }
2700 	    else
2701 	    {
2702 		while (msg_col % width)
2703 		    msg_putchar(' ');
2704 	    }
2705 	}
2706 	else
2707 	{
2708 	    if (msg_col > 0)
2709 		msg_putchar('\n');
2710 	}
2711     }
2712 }
2713 
2714     void
2715 list_version(void)
2716 {
2717     int		i;
2718     int		first;
2719     char	*s = "";
2720 
2721     /*
2722      * When adding features here, don't forget to update the list of
2723      * internal variables in eval.c!
2724      */
2725     init_longVersion();
2726     msg(longVersion);
2727 #ifdef WIN3264
2728 # ifdef FEAT_GUI_W32
2729 #  ifdef _WIN64
2730     msg_puts(_("\nMS-Windows 64-bit GUI version"));
2731 #  else
2732     msg_puts(_("\nMS-Windows 32-bit GUI version"));
2733 #  endif
2734 # ifdef FEAT_OLE
2735     msg_puts(_(" with OLE support"));
2736 # endif
2737 # else
2738 #  ifdef _WIN64
2739     msg_puts(_("\nMS-Windows 64-bit console version"));
2740 #  else
2741     msg_puts(_("\nMS-Windows 32-bit console version"));
2742 #  endif
2743 # endif
2744 #endif
2745 #if defined(MACOS_X)
2746 # if defined(MACOS_X_DARWIN)
2747     msg_puts(_("\nmacOS version"));
2748 # else
2749     msg_puts(_("\nmacOS version w/o darwin feat."));
2750 # endif
2751 #endif
2752 
2753 #ifdef VMS
2754     msg_puts(_("\nOpenVMS version"));
2755 # ifdef HAVE_PATHDEF
2756     if (*compiled_arch != NUL)
2757     {
2758 	msg_puts(" - ");
2759 	msg_puts((char *)compiled_arch);
2760     }
2761 # endif
2762 
2763 #endif
2764 
2765     /* Print the list of patch numbers if there is at least one. */
2766     /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */
2767     if (included_patches[0] != 0)
2768     {
2769 	msg_puts(_("\nIncluded patches: "));
2770 	first = -1;
2771 	/* find last one */
2772 	for (i = 0; included_patches[i] != 0; ++i)
2773 	    ;
2774 	while (--i >= 0)
2775 	{
2776 	    if (first < 0)
2777 		first = included_patches[i];
2778 	    if (i == 0 || included_patches[i - 1] != included_patches[i] + 1)
2779 	    {
2780 		msg_puts(s);
2781 		s = ", ";
2782 		msg_outnum((long)first);
2783 		if (first != included_patches[i])
2784 		{
2785 		    msg_puts("-");
2786 		    msg_outnum((long)included_patches[i]);
2787 		}
2788 		first = -1;
2789 	    }
2790 	}
2791     }
2792 
2793     /* Print the list of extra patch descriptions if there is at least one. */
2794     if (extra_patches[0] != NULL)
2795     {
2796 	msg_puts(_("\nExtra patches: "));
2797 	s = "";
2798 	for (i = 0; extra_patches[i] != NULL; ++i)
2799 	{
2800 	    msg_puts(s);
2801 	    s = ", ";
2802 	    msg_puts(extra_patches[i]);
2803 	}
2804     }
2805 
2806 #ifdef MODIFIED_BY
2807     msg_puts("\n");
2808     msg_puts(_("Modified by "));
2809     msg_puts(MODIFIED_BY);
2810 #endif
2811 
2812 #ifdef HAVE_PATHDEF
2813     if (*compiled_user != NUL || *compiled_sys != NUL)
2814     {
2815 	msg_puts(_("\nCompiled "));
2816 	if (*compiled_user != NUL)
2817 	{
2818 	    msg_puts(_("by "));
2819 	    msg_puts((char *)compiled_user);
2820 	}
2821 	if (*compiled_sys != NUL)
2822 	{
2823 	    msg_puts("@");
2824 	    msg_puts((char *)compiled_sys);
2825 	}
2826     }
2827 #endif
2828 
2829 #ifdef FEAT_HUGE
2830     msg_puts(_("\nHuge version "));
2831 #else
2832 # ifdef FEAT_BIG
2833     msg_puts(_("\nBig version "));
2834 # else
2835 #  ifdef FEAT_NORMAL
2836     msg_puts(_("\nNormal version "));
2837 #  else
2838 #   ifdef FEAT_SMALL
2839     msg_puts(_("\nSmall version "));
2840 #   else
2841     msg_puts(_("\nTiny version "));
2842 #   endif
2843 #  endif
2844 # endif
2845 #endif
2846 #ifndef FEAT_GUI
2847     msg_puts(_("without GUI."));
2848 #else
2849 # ifdef FEAT_GUI_GTK
2850 #  ifdef USE_GTK3
2851     msg_puts(_("with GTK3 GUI."));
2852 #  else
2853 #   ifdef FEAT_GUI_GNOME
2854      msg_puts(_("with GTK2-GNOME GUI."));
2855 #   else
2856      msg_puts(_("with GTK2 GUI."));
2857 #   endif
2858 # endif
2859 # else
2860 #  ifdef FEAT_GUI_MOTIF
2861     msg_puts(_("with X11-Motif GUI."));
2862 #  else
2863 #   ifdef FEAT_GUI_ATHENA
2864 #    ifdef FEAT_GUI_NEXTAW
2865     msg_puts(_("with X11-neXtaw GUI."));
2866 #    else
2867     msg_puts(_("with X11-Athena GUI."));
2868 #    endif
2869 #   else
2870 #     ifdef FEAT_GUI_PHOTON
2871     msg_puts(_("with Photon GUI."));
2872 #     else
2873 #      if defined(MSWIN)
2874     msg_puts(_("with GUI."));
2875 #      else
2876 #	if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON
2877     msg_puts(_("with Carbon GUI."));
2878 #	else
2879 #	 if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX
2880     msg_puts(_("with Cocoa GUI."));
2881 #	 else
2882 #	 endif
2883 #	endif
2884 #      endif
2885 #    endif
2886 #   endif
2887 #  endif
2888 # endif
2889 #endif
2890     version_msg(_("  Features included (+) or not (-):\n"));
2891 
2892     list_features();
2893 
2894 #ifdef SYS_VIMRC_FILE
2895     version_msg(_("   system vimrc file: \""));
2896     version_msg(SYS_VIMRC_FILE);
2897     version_msg("\"\n");
2898 #endif
2899 #ifdef USR_VIMRC_FILE
2900     version_msg(_("     user vimrc file: \""));
2901     version_msg(USR_VIMRC_FILE);
2902     version_msg("\"\n");
2903 #endif
2904 #ifdef USR_VIMRC_FILE2
2905     version_msg(_(" 2nd user vimrc file: \""));
2906     version_msg(USR_VIMRC_FILE2);
2907     version_msg("\"\n");
2908 #endif
2909 #ifdef USR_VIMRC_FILE3
2910     version_msg(_(" 3rd user vimrc file: \""));
2911     version_msg(USR_VIMRC_FILE3);
2912     version_msg("\"\n");
2913 #endif
2914 #ifdef USR_EXRC_FILE
2915     version_msg(_("      user exrc file: \""));
2916     version_msg(USR_EXRC_FILE);
2917     version_msg("\"\n");
2918 #endif
2919 #ifdef USR_EXRC_FILE2
2920     version_msg(_("  2nd user exrc file: \""));
2921     version_msg(USR_EXRC_FILE2);
2922     version_msg("\"\n");
2923 #endif
2924 #ifdef FEAT_GUI
2925 # ifdef SYS_GVIMRC_FILE
2926     version_msg(_("  system gvimrc file: \""));
2927     version_msg(SYS_GVIMRC_FILE);
2928     version_msg("\"\n");
2929 # endif
2930     version_msg(_("    user gvimrc file: \""));
2931     version_msg(USR_GVIMRC_FILE);
2932     version_msg("\"\n");
2933 # ifdef USR_GVIMRC_FILE2
2934     version_msg(_("2nd user gvimrc file: \""));
2935     version_msg(USR_GVIMRC_FILE2);
2936     version_msg("\"\n");
2937 # endif
2938 # ifdef USR_GVIMRC_FILE3
2939     version_msg(_("3rd user gvimrc file: \""));
2940     version_msg(USR_GVIMRC_FILE3);
2941     version_msg("\"\n");
2942 # endif
2943 #endif
2944     version_msg(_("       defaults file: \""));
2945     version_msg(VIM_DEFAULTS_FILE);
2946     version_msg("\"\n");
2947 #ifdef FEAT_GUI
2948 # ifdef SYS_MENU_FILE
2949     version_msg(_("    system menu file: \""));
2950     version_msg(SYS_MENU_FILE);
2951     version_msg("\"\n");
2952 # endif
2953 #endif
2954 #ifdef HAVE_PATHDEF
2955     if (*default_vim_dir != NUL)
2956     {
2957 	version_msg(_("  fall-back for $VIM: \""));
2958 	version_msg((char *)default_vim_dir);
2959 	version_msg("\"\n");
2960     }
2961     if (*default_vimruntime_dir != NUL)
2962     {
2963 	version_msg(_(" f-b for $VIMRUNTIME: \""));
2964 	version_msg((char *)default_vimruntime_dir);
2965 	version_msg("\"\n");
2966     }
2967     version_msg(_("Compilation: "));
2968     version_msg((char *)all_cflags);
2969     version_msg("\n");
2970 #ifdef VMS
2971     if (*compiler_version != NUL)
2972     {
2973 	version_msg(_("Compiler: "));
2974 	version_msg((char *)compiler_version);
2975 	version_msg("\n");
2976     }
2977 #endif
2978     version_msg(_("Linking: "));
2979     version_msg((char *)all_lflags);
2980 #endif
2981 #ifdef DEBUG
2982     version_msg("\n");
2983     version_msg(_("  DEBUG BUILD"));
2984 #endif
2985 }
2986 
2987 static void do_intro_line(int row, char_u *mesg, int add_version, int attr);
2988 
2989 /*
2990  * Show the intro message when not editing a file.
2991  */
2992     void
2993 maybe_intro_message(void)
2994 {
2995     if (BUFEMPTY()
2996 	    && curbuf->b_fname == NULL
2997 	    && firstwin->w_next == NULL
2998 	    && vim_strchr(p_shm, SHM_INTRO) == NULL)
2999 	intro_message(FALSE);
3000 }
3001 
3002 /*
3003  * Give an introductory message about Vim.
3004  * Only used when starting Vim on an empty file, without a file name.
3005  * Or with the ":intro" command (for Sven :-).
3006  */
3007     void
3008 intro_message(
3009     int		colon)		/* TRUE for ":intro" */
3010 {
3011     int		i;
3012     int		row;
3013     int		blanklines;
3014     int		sponsor;
3015     char	*p;
3016     static char	*(lines[]) =
3017     {
3018 	N_("VIM - Vi IMproved"),
3019 	"",
3020 	N_("version "),
3021 	N_("by Bram Moolenaar et al."),
3022 #ifdef MODIFIED_BY
3023 	" ",
3024 #endif
3025 	N_("Vim is open source and freely distributable"),
3026 	"",
3027 	N_("Help poor children in Uganda!"),
3028 	N_("type  :help iccf<Enter>       for information "),
3029 	"",
3030 	N_("type  :q<Enter>               to exit         "),
3031 	N_("type  :help<Enter>  or  <F1>  for on-line help"),
3032 	N_("type  :help version8<Enter>   for version info"),
3033 	NULL,
3034 	"",
3035 	N_("Running in Vi compatible mode"),
3036 	N_("type  :set nocp<Enter>        for Vim defaults"),
3037 	N_("type  :help cp-default<Enter> for info on this"),
3038     };
3039 #ifdef FEAT_GUI
3040     static char	*(gui_lines[]) =
3041     {
3042 	NULL,
3043 	NULL,
3044 	NULL,
3045 	NULL,
3046 #ifdef MODIFIED_BY
3047 	NULL,
3048 #endif
3049 	NULL,
3050 	NULL,
3051 	NULL,
3052 	N_("menu  Help->Orphans           for information    "),
3053 	NULL,
3054 	N_("Running modeless, typed text is inserted"),
3055 	N_("menu  Edit->Global Settings->Toggle Insert Mode  "),
3056 	N_("                              for two modes      "),
3057 	NULL,
3058 	NULL,
3059 	NULL,
3060 	N_("menu  Edit->Global Settings->Toggle Vi Compatible"),
3061 	N_("                              for Vim defaults   "),
3062     };
3063 #endif
3064 
3065     /* blanklines = screen height - # message lines */
3066     blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1);
3067     if (!p_cp)
3068 	blanklines += 4;  /* add 4 for not showing "Vi compatible" message */
3069 
3070     /* Don't overwrite a statusline.  Depends on 'cmdheight'. */
3071     if (p_ls > 1)
3072 	blanklines -= Rows - topframe->fr_height;
3073     if (blanklines < 0)
3074 	blanklines = 0;
3075 
3076     /* Show the sponsor and register message one out of four times, the Uganda
3077      * message two out of four times. */
3078     sponsor = (int)time(NULL);
3079     sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0);
3080 
3081     /* start displaying the message lines after half of the blank lines */
3082     row = blanklines / 2;
3083     if ((row >= 2 && Columns >= 50) || colon)
3084     {
3085 	for (i = 0; i < (int)(sizeof(lines) / sizeof(char *)); ++i)
3086 	{
3087 	    p = lines[i];
3088 #ifdef FEAT_GUI
3089 	    if (p_im && gui.in_use && gui_lines[i] != NULL)
3090 		p = gui_lines[i];
3091 #endif
3092 	    if (p == NULL)
3093 	    {
3094 		if (!p_cp)
3095 		    break;
3096 		continue;
3097 	    }
3098 	    if (sponsor != 0)
3099 	    {
3100 		if (strstr(p, "children") != NULL)
3101 		    p = sponsor < 0
3102 			? N_("Sponsor Vim development!")
3103 			: N_("Become a registered Vim user!");
3104 		else if (strstr(p, "iccf") != NULL)
3105 		    p = sponsor < 0
3106 			? N_("type  :help sponsor<Enter>    for information ")
3107 			: N_("type  :help register<Enter>   for information ");
3108 		else if (strstr(p, "Orphans") != NULL)
3109 		    p = N_("menu  Help->Sponsor/Register  for information    ");
3110 	    }
3111 	    if (*p != NUL)
3112 		do_intro_line(row, (char_u *)_(p), i == 2, 0);
3113 	    ++row;
3114 	}
3115     }
3116 
3117     /* Make the wait-return message appear just below the text. */
3118     if (colon)
3119 	msg_row = row;
3120 }
3121 
3122     static void
3123 do_intro_line(
3124     int		row,
3125     char_u	*mesg,
3126     int		add_version,
3127     int		attr)
3128 {
3129     char_u	vers[20];
3130     int		col;
3131     char_u	*p;
3132     int		l;
3133     int		clen;
3134 #ifdef MODIFIED_BY
3135 # define MODBY_LEN 150
3136     char_u	modby[MODBY_LEN];
3137 
3138     if (*mesg == ' ')
3139     {
3140 	vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1);
3141 	l = (int)STRLEN(modby);
3142 	vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1);
3143 	mesg = modby;
3144     }
3145 #endif
3146 
3147     /* Center the message horizontally. */
3148     col = vim_strsize(mesg);
3149     if (add_version)
3150     {
3151 	STRCPY(vers, mediumVersion);
3152 	if (highest_patch())
3153 	{
3154 	    /* Check for 9.9x or 9.9xx, alpha/beta version */
3155 	    if (isalpha((int)vers[3]))
3156 	    {
3157 		int len = (isalpha((int)vers[4])) ? 5 : 4;
3158 		sprintf((char *)vers + len, ".%d%s", highest_patch(),
3159 							 mediumVersion + len);
3160 	    }
3161 	    else
3162 		sprintf((char *)vers + 3, ".%d", highest_patch());
3163 	}
3164 	col += (int)STRLEN(vers);
3165     }
3166     col = (Columns - col) / 2;
3167     if (col < 0)
3168 	col = 0;
3169 
3170     /* Split up in parts to highlight <> items differently. */
3171     for (p = mesg; *p != NUL; p += l)
3172     {
3173 	clen = 0;
3174 	for (l = 0; p[l] != NUL
3175 			 && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l)
3176 	{
3177 	    if (has_mbyte)
3178 	    {
3179 		clen += ptr2cells(p + l);
3180 		l += (*mb_ptr2len)(p + l) - 1;
3181 	    }
3182 	    else
3183 		clen += byte2cells(p[l]);
3184 	}
3185 	screen_puts_len(p, l, row, col, *p == '<' ? HL_ATTR(HLF_8) : attr);
3186 	col += clen;
3187     }
3188 
3189     /* Add the version number to the version line. */
3190     if (add_version)
3191 	screen_puts(vers, row, col, 0);
3192 }
3193 
3194 /*
3195  * ":intro": clear screen, display intro screen and wait for return.
3196  */
3197     void
3198 ex_intro(exarg_T *eap UNUSED)
3199 {
3200     screenclear();
3201     intro_message(TRUE);
3202     wait_return(TRUE);
3203 }
3204