]> granicus.if.org Git - vim/blob - src/version.c
patch 9.0.1322: crash when indexing "any" which is an object
[vim] / src / version.c
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 /*
13  * Vim originated from Stevie version 3.6 (Fish disk 217) by GRWalter (Fred)
14  * It has been changed beyond recognition since then.
15  *
16  * Differences between version 8.2 and 9.0 can be found with ":help version9".
17  * Differences between version 7.4 and 8.x can be found with ":help version8".
18  * Differences between version 6.4 and 7.x can be found with ":help version7".
19  * Differences between version 5.8 and 6.x can be found with ":help version6".
20  * Differences between version 4.x and 5.x can be found with ":help version5".
21  * Differences between version 3.0 and 4.x can be found with ":help version4".
22  * All the remarks about older versions have been removed, they are not very
23  * interesting.
24  */
25
26 #include "version.h"
27
28 char            *Version = VIM_VERSION_SHORT;
29 static char     *mediumVersion = VIM_VERSION_MEDIUM;
30
31 #if defined(HAVE_DATE_TIME) || defined(PROTO)
32 # if (defined(VMS) && defined(VAXC)) || defined(PROTO)
33 char    longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__)
34                                                       + sizeof(__TIME__) + 3];
35
36     void
37 init_longVersion(void)
38 {
39     /*
40      * Construct the long version string.  Necessary because
41      * VAX C can't concatenate strings in the preprocessor.
42      */
43     strcpy(longVersion, VIM_VERSION_LONG_DATE);
44 #ifdef BUILD_DATE
45     strcat(longVersion, BUILD_DATE);
46 #else
47     strcat(longVersion, __DATE__);
48     strcat(longVersion, " ");
49     strcat(longVersion, __TIME__);
50 #endif
51     strcat(longVersion, ")");
52 }
53
54 # else
55 char    *longVersion = NULL;
56
57     void
58 init_longVersion(void)
59 {
60     if (longVersion != NULL)
61         return;
62
63 #ifdef BUILD_DATE
64     char *date_time = BUILD_DATE;
65 #else
66     char *date_time = __DATE__ " " __TIME__;
67 #endif
68     char *msg = _("%s (%s, compiled %s)");
69     size_t len = strlen(msg)
70         + strlen(VIM_VERSION_LONG_ONLY)
71         + strlen(VIM_VERSION_DATE_ONLY)
72         + strlen(date_time);
73
74     longVersion = alloc(len);
75     if (longVersion == NULL)
76         longVersion = VIM_VERSION_LONG;
77     else
78         vim_snprintf(longVersion, len, msg,
79                 VIM_VERSION_LONG_ONLY, VIM_VERSION_DATE_ONLY, date_time);
80 }
81 # endif
82 #else
83 char    *longVersion = VIM_VERSION_LONG;
84
85     void
86 init_longVersion(void)
87 {
88     // nothing to do
89 }
90 #endif
91
92 static char *(features[]) =
93 {
94 #ifdef HAVE_ACL
95         "+acl",
96 #else
97         "-acl",
98 #endif
99 #ifdef AMIGA            // only for Amiga systems
100 # ifdef FEAT_ARP
101         "+ARP",
102 # else
103         "-ARP",
104 # endif
105 #endif
106 #ifdef FEAT_ARABIC
107         "+arabic",
108 #else
109         "-arabic",
110 #endif
111         "+autocmd",
112 #ifdef FEAT_AUTOCHDIR
113        "+autochdir",
114 #else
115        "-autochdir",
116 #endif
117 #ifdef FEAT_AUTOSERVERNAME
118         "+autoservername",
119 #else
120         "-autoservername",
121 #endif
122 #ifdef FEAT_BEVAL_GUI
123         "+balloon_eval",
124 #else
125         "-balloon_eval",
126 #endif
127 #ifdef FEAT_BEVAL_TERM
128         "+balloon_eval_term",
129 #else
130         "-balloon_eval_term",
131 #endif
132 #ifdef FEAT_BROWSE
133         "+browse",
134 #else
135         "-browse",
136 #endif
137         "++builtin_terms",
138 #ifdef FEAT_BYTEOFF
139         "+byte_offset",
140 #else
141         "-byte_offset",
142 #endif
143 #ifdef FEAT_JOB_CHANNEL
144         "+channel",
145 #else
146         "-channel",
147 #endif
148         "+cindent",
149 #ifdef FEAT_CLIENTSERVER
150         "+clientserver",
151 #else
152         "-clientserver",
153 #endif
154 #ifdef FEAT_CLIPBOARD
155         "+clipboard",
156 #else
157         "-clipboard",
158 #endif
159         "+cmdline_compl",
160         "+cmdline_hist",
161         "+cmdline_info",
162         "+comments",
163 #ifdef FEAT_CONCEAL
164         "+conceal",
165 #else
166         "-conceal",
167 #endif
168 #ifdef FEAT_CRYPT
169         "+cryptv",
170 #else
171         "-cryptv",
172 #endif
173 #ifdef FEAT_CSCOPE
174         "+cscope",
175 #else
176         "-cscope",
177 #endif
178         "+cursorbind",
179 #ifdef CURSOR_SHAPE
180         "+cursorshape",
181 #else
182         "-cursorshape",
183 #endif
184 #if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG)
185         "+dialog_con_gui",
186 #else
187 # if defined(FEAT_CON_DIALOG)
188         "+dialog_con",
189 # else
190 #  if defined(FEAT_GUI_DIALOG)
191         "+dialog_gui",
192 #  else
193         "-dialog",
194 #  endif
195 # endif
196 #endif
197 #ifdef FEAT_DIFF
198         "+diff",
199 #else
200         "-diff",
201 #endif
202 #ifdef FEAT_DIGRAPHS
203         "+digraphs",
204 #else
205         "-digraphs",
206 #endif
207 #ifdef FEAT_GUI_MSWIN
208 # ifdef FEAT_DIRECTX
209         "+directx",
210 # else
211         "-directx",
212 # endif
213 #endif
214 #ifdef FEAT_DND
215         "+dnd",
216 #else
217         "-dnd",
218 #endif
219         "-ebcdic",
220 #ifdef FEAT_EMACS_TAGS
221         "+emacs_tags",
222 #else
223         "-emacs_tags",
224 #endif
225 #ifdef FEAT_EVAL
226         "+eval",
227 #else
228         "-eval",
229 #endif
230         "+ex_extra",
231 #ifdef FEAT_SEARCH_EXTRA
232         "+extra_search",
233 #else
234         "-extra_search",
235 #endif
236         "-farsi",
237         "+file_in_path",
238 #ifdef FEAT_FIND_ID
239         "+find_in_path",
240 #else
241         "-find_in_path",
242 #endif
243         "+float",
244 #ifdef FEAT_FOLDING
245         "+folding",
246 #else
247         "-folding",
248 #endif
249         "-footer",
250         // only interesting on Unix systems
251 #if !defined(USE_SYSTEM) && defined(UNIX)
252         "+fork()",
253 #endif
254 #ifdef FEAT_GETTEXT
255 # ifdef DYNAMIC_GETTEXT
256         "+gettext/dyn",
257 # else
258         "+gettext",
259 # endif
260 #else
261         "-gettext",
262 #endif
263         "-hangul_input",
264 #if (defined(HAVE_ICONV_H) && defined(USE_ICONV)) || defined(DYNAMIC_ICONV)
265 # ifdef DYNAMIC_ICONV
266         "+iconv/dyn",
267 # else
268         "+iconv",
269 # endif
270 #else
271         "-iconv",
272 #endif
273         "+insert_expand",
274 #ifdef FEAT_IPV6
275         "+ipv6",
276 #else
277         "-ipv6",
278 #endif
279 #ifdef FEAT_JOB_CHANNEL
280         "+job",
281 #else
282         "-job",
283 #endif
284         "+jumplist",
285 #ifdef FEAT_KEYMAP
286         "+keymap",
287 #else
288         "-keymap",
289 #endif
290 #ifdef FEAT_EVAL
291         "+lambda",
292 #else
293         "-lambda",
294 #endif
295 #ifdef FEAT_LANGMAP
296         "+langmap",
297 #else
298         "-langmap",
299 #endif
300 #ifdef FEAT_LIBCALL
301         "+libcall",
302 #else
303         "-libcall",
304 #endif
305 #ifdef FEAT_LINEBREAK
306         "+linebreak",
307 #else
308         "-linebreak",
309 #endif
310         "+lispindent",
311         "+listcmds",
312         "+localmap",
313 #ifdef FEAT_LUA
314 # ifdef DYNAMIC_LUA
315         "+lua/dyn",
316 # else
317         "+lua",
318 # endif
319 #else
320         "-lua",
321 #endif
322 #ifdef FEAT_MENU
323         "+menu",
324 #else
325         "-menu",
326 #endif
327 #ifdef FEAT_SESSION
328         "+mksession",
329 #else
330         "-mksession",
331 #endif
332         "+modify_fname",
333         "+mouse",
334 #ifdef FEAT_MOUSESHAPE
335         "+mouseshape",
336 #else
337         "-mouseshape",
338 #endif
339
340 #if defined(UNIX) || defined(VMS)
341 # ifdef FEAT_MOUSE_DEC
342         "+mouse_dec",
343 # else
344         "-mouse_dec",
345 # endif
346 # ifdef FEAT_MOUSE_GPM
347 #  ifdef DYNAMIC_GPM
348         "+mouse_gpm/dyn",
349 #  else
350         "+mouse_gpm",
351 #  endif
352 # else
353         "-mouse_gpm",
354 # endif
355 # ifdef FEAT_MOUSE_JSB
356         "+mouse_jsbterm",
357 # else
358         "-mouse_jsbterm",
359 # endif
360 # ifdef FEAT_MOUSE_NET
361         "+mouse_netterm",
362 # else
363         "-mouse_netterm",
364 # endif
365 #endif
366
367 #ifdef __QNX__
368 # ifdef FEAT_MOUSE_PTERM
369         "+mouse_pterm",
370 # else
371         "-mouse_pterm",
372 # endif
373 #endif
374
375 #if defined(UNIX) || defined(VMS)
376         "+mouse_sgr",
377 # ifdef FEAT_SYSMOUSE
378         "+mouse_sysmouse",
379 # else
380         "-mouse_sysmouse",
381 # endif
382 # ifdef FEAT_MOUSE_URXVT
383         "+mouse_urxvt",
384 # else
385         "-mouse_urxvt",
386 # endif
387         "+mouse_xterm",
388 #endif
389
390 #ifdef FEAT_MBYTE_IME
391 # ifdef DYNAMIC_IME
392         "+multi_byte_ime/dyn",
393 # else
394         "+multi_byte_ime",
395 # endif
396 #else
397         "+multi_byte",
398 #endif
399 #ifdef FEAT_MULTI_LANG
400         "+multi_lang",
401 #else
402         "-multi_lang",
403 #endif
404 #ifdef FEAT_MZSCHEME
405 # ifdef DYNAMIC_MZSCHEME
406         "+mzscheme/dyn",
407 # else
408         "+mzscheme",
409 # endif
410 #else
411         "-mzscheme",
412 #endif
413 #ifdef FEAT_NETBEANS_INTG
414         "+netbeans_intg",
415 #else
416         "-netbeans_intg",
417 #endif
418         "+num64",
419 #ifdef FEAT_GUI_MSWIN
420 # ifdef FEAT_OLE
421         "+ole",
422 # else
423         "-ole",
424 # endif
425 #endif
426 #ifdef FEAT_EVAL
427         "+packages",
428 #else
429         "-packages",
430 #endif
431         "+path_extra",
432 #ifdef FEAT_PERL
433 # ifdef DYNAMIC_PERL
434         "+perl/dyn",
435 # else
436         "+perl",
437 # endif
438 #else
439         "-perl",
440 #endif
441 #ifdef FEAT_PERSISTENT_UNDO
442         "+persistent_undo",
443 #else
444         "-persistent_undo",
445 #endif
446 #ifdef FEAT_PROP_POPUP
447         "+popupwin",
448 #else
449         "-popupwin",
450 #endif
451 #ifdef FEAT_PRINTER
452 # ifdef FEAT_POSTSCRIPT
453         "+postscript",
454 # else
455         "-postscript",
456 # endif
457         "+printer",
458 #else
459         "-printer",
460 #endif
461 #ifdef FEAT_PROFILE
462         "+profile",
463 #else
464         "-profile",
465 #endif
466 #ifdef FEAT_PYTHON
467 # ifdef DYNAMIC_PYTHON
468         "+python/dyn",
469 # else
470         "+python",
471 # endif
472 #else
473         "-python",
474 #endif
475 #ifdef FEAT_PYTHON3
476 # ifdef DYNAMIC_PYTHON3
477         "+python3/dyn",
478 # else
479         "+python3",
480 # endif
481 #else
482         "-python3",
483 #endif
484 #ifdef FEAT_QUICKFIX
485         "+quickfix",
486 #else
487         "-quickfix",
488 #endif
489 #ifdef FEAT_RELTIME
490         "+reltime",
491 #else
492         "-reltime",
493 #endif
494 #ifdef FEAT_RIGHTLEFT
495         "+rightleft",
496 #else
497         "-rightleft",
498 #endif
499 #ifdef FEAT_RUBY
500 # ifdef DYNAMIC_RUBY
501         "+ruby/dyn",
502 # else
503         "+ruby",
504 # endif
505 #else
506         "-ruby",
507 #endif
508         "+scrollbind",
509 #ifdef FEAT_SIGNS
510         "+signs",
511 #else
512         "-signs",
513 #endif
514         "+smartindent",
515 #ifdef FEAT_SODIUM
516 # ifdef DYNAMIC_SODIUM
517         "+sodium/dyn",
518 # else
519         "+sodium",
520 # endif
521 #else
522         "-sodium",
523 #endif
524 #ifdef FEAT_SOUND
525         "+sound",
526 #else
527         "-sound",
528 #endif
529 #ifdef FEAT_SPELL
530         "+spell",
531 #else
532         "-spell",
533 #endif
534 #ifdef STARTUPTIME
535         "+startuptime",
536 #else
537         "-startuptime",
538 #endif
539 #ifdef FEAT_STL_OPT
540         "+statusline",
541 #else
542         "-statusline",
543 #endif
544         "-sun_workshop",
545 #ifdef FEAT_SYN_HL
546         "+syntax",
547 #else
548         "-syntax",
549 #endif
550             // only interesting on Unix systems
551 #if defined(USE_SYSTEM) && defined(UNIX)
552         "+system()",
553 #endif
554         "+tag_binary",
555         "-tag_old_static",
556         "-tag_any_white",
557 #ifdef FEAT_TCL
558 # ifdef DYNAMIC_TCL
559         "+tcl/dyn",
560 # else
561         "+tcl",
562 # endif
563 #else
564         "-tcl",
565 #endif
566 #ifdef FEAT_TERMGUICOLORS
567         "+termguicolors",
568 #else
569         "-termguicolors",
570 #endif
571 #ifdef FEAT_TERMINAL
572         "+terminal",
573 #else
574         "-terminal",
575 #endif
576 #if defined(UNIX)
577 // only Unix can have terminfo instead of termcap
578 # ifdef TERMINFO
579         "+terminfo",
580 # else
581         "-terminfo",
582 # endif
583 #endif
584 #ifdef FEAT_TERMRESPONSE
585         "+termresponse",
586 #else
587         "-termresponse",
588 #endif
589         "+textobjects",
590 #ifdef FEAT_PROP_POPUP
591         "+textprop",
592 #else
593         "-textprop",
594 #endif
595 #if !defined(UNIX)
596 // unix always includes termcap support
597 # ifdef HAVE_TGETENT
598         "+tgetent",
599 # else
600         "-tgetent",
601 # endif
602 #endif
603 #ifdef FEAT_TIMERS
604         "+timers",
605 #else
606         "-timers",
607 #endif
608         "+title",
609 #ifdef FEAT_TOOLBAR
610         "+toolbar",
611 #else
612         "-toolbar",
613 #endif
614         "+user_commands",
615 #ifdef FEAT_VARTABS
616         "+vartabs",
617 #else
618         "-vartabs",
619 #endif
620         "+vertsplit",
621         "+vim9script",
622 #ifdef FEAT_VIMINFO
623         "+viminfo",
624 #else
625         "-viminfo",
626 #endif
627         "+virtualedit",
628         "+visual",
629         "+visualextra",
630         "+vreplace",
631 #ifdef MSWIN
632 # ifdef FEAT_VTP
633         "+vtp",
634 # else
635         "-vtp",
636 # endif
637 #endif
638         "+wildignore",
639         "+wildmenu",
640         "+windows",
641 #ifdef FEAT_WRITEBACKUP
642         "+writebackup",
643 #else
644         "-writebackup",
645 #endif
646 #if defined(UNIX) || defined(VMS)
647 # ifdef FEAT_X11
648         "+X11",
649 # else
650         "-X11",
651 # endif
652 #endif
653 #ifdef FEAT_XFONTSET
654         "+xfontset",
655 #else
656         "-xfontset",
657 #endif
658 #ifdef FEAT_XIM
659         "+xim",
660 #else
661         "-xim",
662 #endif
663 #if defined(MSWIN)
664 # ifdef FEAT_XPM_W32
665         "+xpm_w32",
666 # else
667         "-xpm_w32",
668 # endif
669 #elif defined(HAVE_XPM)
670         "+xpm",
671 #else
672         "-xpm",
673 #endif
674 #if defined(UNIX) || defined(VMS)
675 # if defined(USE_XSMP_INTERACT)
676         "+xsmp_interact",
677 # elif defined(USE_XSMP)
678         "+xsmp",
679 # else
680         "-xsmp",
681 # endif
682 # ifdef FEAT_XCLIPBOARD
683         "+xterm_clipboard",
684 # else
685         "-xterm_clipboard",
686 # endif
687 #endif
688 #ifdef FEAT_XTERM_SAVE
689         "+xterm_save",
690 #else
691         "-xterm_save",
692 #endif
693         NULL
694 };
695
696 static int included_patches[] =
697 {   /* Add new patch number below this line */
698 /**/
699     1322,
700 /**/
701     1321,
702 /**/
703     1320,
704 /**/
705     1319,
706 /**/
707     1318,
708 /**/
709     1317,
710 /**/
711     1316,
712 /**/
713     1315,
714 /**/
715     1314,
716 /**/
717     1313,
718 /**/
719     1312,
720 /**/
721     1311,
722 /**/
723     1310,
724 /**/
725     1309,
726 /**/
727     1308,
728 /**/
729     1307,
730 /**/
731     1306,
732 /**/
733     1305,
734 /**/
735     1304,
736 /**/
737     1303,
738 /**/
739     1302,
740 /**/
741     1301,
742 /**/
743     1300,
744 /**/
745     1299,
746 /**/
747     1298,
748 /**/
749     1297,
750 /**/
751     1296,
752 /**/
753     1295,
754 /**/
755     1294,
756 /**/
757     1293,
758 /**/
759     1292,
760 /**/
761     1291,
762 /**/
763     1290,
764 /**/
765     1289,
766 /**/
767     1288,
768 /**/
769     1287,
770 /**/
771     1286,
772 /**/
773     1285,
774 /**/
775     1284,
776 /**/
777     1283,
778 /**/
779     1282,
780 /**/
781     1281,
782 /**/
783     1280,
784 /**/
785     1279,
786 /**/
787     1278,
788 /**/
789     1277,
790 /**/
791     1276,
792 /**/
793     1275,
794 /**/
795     1274,
796 /**/
797     1273,
798 /**/
799     1272,
800 /**/
801     1271,
802 /**/
803     1270,
804 /**/
805     1269,
806 /**/
807     1268,
808 /**/
809     1267,
810 /**/
811     1266,
812 /**/
813     1265,
814 /**/
815     1264,
816 /**/
817     1263,
818 /**/
819     1262,
820 /**/
821     1261,
822 /**/
823     1260,
824 /**/
825     1259,
826 /**/
827     1258,
828 /**/
829     1257,
830 /**/
831     1256,
832 /**/
833     1255,
834 /**/
835     1254,
836 /**/
837     1253,
838 /**/
839     1252,
840 /**/
841     1251,
842 /**/
843     1250,
844 /**/
845     1249,
846 /**/
847     1248,
848 /**/
849     1247,
850 /**/
851     1246,
852 /**/
853     1245,
854 /**/
855     1244,
856 /**/
857     1243,
858 /**/
859     1242,
860 /**/
861     1241,
862 /**/
863     1240,
864 /**/
865     1239,
866 /**/
867     1238,
868 /**/
869     1237,
870 /**/
871     1236,
872 /**/
873     1235,
874 /**/
875     1234,
876 /**/
877     1233,
878 /**/
879     1232,
880 /**/
881     1231,
882 /**/
883     1230,
884 /**/
885     1229,
886 /**/
887     1228,
888 /**/
889     1227,
890 /**/
891     1226,
892 /**/
893     1225,
894 /**/
895     1224,
896 /**/
897     1223,
898 /**/
899     1222,
900 /**/
901     1221,
902 /**/
903     1220,
904 /**/
905     1219,
906 /**/
907     1218,
908 /**/
909     1217,
910 /**/
911     1216,
912 /**/
913     1215,
914 /**/
915     1214,
916 /**/
917     1213,
918 /**/
919     1212,
920 /**/
921     1211,
922 /**/
923     1210,
924 /**/
925     1209,
926 /**/
927     1208,
928 /**/
929     1207,
930 /**/
931     1206,
932 /**/
933     1205,
934 /**/
935     1204,
936 /**/
937     1203,
938 /**/
939     1202,
940 /**/
941     1201,
942 /**/
943     1200,
944 /**/
945     1199,
946 /**/
947     1198,
948 /**/
949     1197,
950 /**/
951     1196,
952 /**/
953     1195,
954 /**/
955     1194,
956 /**/
957     1193,
958 /**/
959     1192,
960 /**/
961     1191,
962 /**/
963     1190,
964 /**/
965     1189,
966 /**/
967     1188,
968 /**/
969     1187,
970 /**/
971     1186,
972 /**/
973     1185,
974 /**/
975     1184,
976 /**/
977     1183,
978 /**/
979     1182,
980 /**/
981     1181,
982 /**/
983     1180,
984 /**/
985     1179,
986 /**/
987     1178,
988 /**/
989     1177,
990 /**/
991     1176,
992 /**/
993     1175,
994 /**/
995     1174,
996 /**/
997     1173,
998 /**/
999     1172,
1000 /**/
1001     1171,
1002 /**/
1003     1170,
1004 /**/
1005     1169,
1006 /**/
1007     1168,
1008 /**/
1009     1167,
1010 /**/
1011     1166,
1012 /**/
1013     1165,
1014 /**/
1015     1164,
1016 /**/
1017     1163,
1018 /**/
1019     1162,
1020 /**/
1021     1161,
1022 /**/
1023     1160,
1024 /**/
1025     1159,
1026 /**/
1027     1158,
1028 /**/
1029     1157,
1030 /**/
1031     1156,
1032 /**/
1033     1155,
1034 /**/
1035     1154,
1036 /**/
1037     1153,
1038 /**/
1039     1152,
1040 /**/
1041     1151,
1042 /**/
1043     1150,
1044 /**/
1045     1149,
1046 /**/
1047     1148,
1048 /**/
1049     1147,
1050 /**/
1051     1146,
1052 /**/
1053     1145,
1054 /**/
1055     1144,
1056 /**/
1057     1143,
1058 /**/
1059     1142,
1060 /**/
1061     1141,
1062 /**/
1063     1140,
1064 /**/
1065     1139,
1066 /**/
1067     1138,
1068 /**/
1069     1137,
1070 /**/
1071     1136,
1072 /**/
1073     1135,
1074 /**/
1075     1134,
1076 /**/
1077     1133,
1078 /**/
1079     1132,
1080 /**/
1081     1131,
1082 /**/
1083     1130,
1084 /**/
1085     1129,
1086 /**/
1087     1128,
1088 /**/
1089     1127,
1090 /**/
1091     1126,
1092 /**/
1093     1125,
1094 /**/
1095     1124,
1096 /**/
1097     1123,
1098 /**/
1099     1122,
1100 /**/
1101     1121,
1102 /**/
1103     1120,
1104 /**/
1105     1119,
1106 /**/
1107     1118,
1108 /**/
1109     1117,
1110 /**/
1111     1116,
1112 /**/
1113     1115,
1114 /**/
1115     1114,
1116 /**/
1117     1113,
1118 /**/
1119     1112,
1120 /**/
1121     1111,
1122 /**/
1123     1110,
1124 /**/
1125     1109,
1126 /**/
1127     1108,
1128 /**/
1129     1107,
1130 /**/
1131     1106,
1132 /**/
1133     1105,
1134 /**/
1135     1104,
1136 /**/
1137     1103,
1138 /**/
1139     1102,
1140 /**/
1141     1101,
1142 /**/
1143     1100,
1144 /**/
1145     1099,
1146 /**/
1147     1098,
1148 /**/
1149     1097,
1150 /**/
1151     1096,
1152 /**/
1153     1095,
1154 /**/
1155     1094,
1156 /**/
1157     1093,
1158 /**/
1159     1092,
1160 /**/
1161     1091,
1162 /**/
1163     1090,
1164 /**/
1165     1089,
1166 /**/
1167     1088,
1168 /**/
1169     1087,
1170 /**/
1171     1086,
1172 /**/
1173     1085,
1174 /**/
1175     1084,
1176 /**/
1177     1083,
1178 /**/
1179     1082,
1180 /**/
1181     1081,
1182 /**/
1183     1080,
1184 /**/
1185     1079,
1186 /**/
1187     1078,
1188 /**/
1189     1077,
1190 /**/
1191     1076,
1192 /**/
1193     1075,
1194 /**/
1195     1074,
1196 /**/
1197     1073,
1198 /**/
1199     1072,
1200 /**/
1201     1071,
1202 /**/
1203     1070,
1204 /**/
1205     1069,
1206 /**/
1207     1068,
1208 /**/
1209     1067,
1210 /**/
1211     1066,
1212 /**/
1213     1065,
1214 /**/
1215     1064,
1216 /**/
1217     1063,
1218 /**/
1219     1062,
1220 /**/
1221     1061,
1222 /**/
1223     1060,
1224 /**/
1225     1059,
1226 /**/
1227     1058,
1228 /**/
1229     1057,
1230 /**/
1231     1056,
1232 /**/
1233     1055,
1234 /**/
1235     1054,
1236 /**/
1237     1053,
1238 /**/
1239     1052,
1240 /**/
1241     1051,
1242 /**/
1243     1050,
1244 /**/
1245     1049,
1246 /**/
1247     1048,
1248 /**/
1249     1047,
1250 /**/
1251     1046,
1252 /**/
1253     1045,
1254 /**/
1255     1044,
1256 /**/
1257     1043,
1258 /**/
1259     1042,
1260 /**/
1261     1041,
1262 /**/
1263     1040,
1264 /**/
1265     1039,
1266 /**/
1267     1038,
1268 /**/
1269     1037,
1270 /**/
1271     1036,
1272 /**/
1273     1035,
1274 /**/
1275     1034,
1276 /**/
1277     1033,
1278 /**/
1279     1032,
1280 /**/
1281     1031,
1282 /**/
1283     1030,
1284 /**/
1285     1029,
1286 /**/
1287     1028,
1288 /**/
1289     1027,
1290 /**/
1291     1026,
1292 /**/
1293     1025,
1294 /**/
1295     1024,
1296 /**/
1297     1023,
1298 /**/
1299     1022,
1300 /**/
1301     1021,
1302 /**/
1303     1020,
1304 /**/
1305     1019,
1306 /**/
1307     1018,
1308 /**/
1309     1017,
1310 /**/
1311     1016,
1312 /**/
1313     1015,
1314 /**/
1315     1014,
1316 /**/
1317     1013,
1318 /**/
1319     1012,
1320 /**/
1321     1011,
1322 /**/
1323     1010,
1324 /**/
1325     1009,
1326 /**/
1327     1008,
1328 /**/
1329     1007,
1330 /**/
1331     1006,
1332 /**/
1333     1005,
1334 /**/
1335     1004,
1336 /**/
1337     1003,
1338 /**/
1339     1002,
1340 /**/
1341     1001,
1342 /**/
1343     1000,
1344 /**/
1345     999,
1346 /**/
1347     998,
1348 /**/
1349     997,
1350 /**/
1351     996,
1352 /**/
1353     995,
1354 /**/
1355     994,
1356 /**/
1357     993,
1358 /**/
1359     992,
1360 /**/
1361     991,
1362 /**/
1363     990,
1364 /**/
1365     989,
1366 /**/
1367     988,
1368 /**/
1369     987,
1370 /**/
1371     986,
1372 /**/
1373     985,
1374 /**/
1375     984,
1376 /**/
1377     983,
1378 /**/
1379     982,
1380 /**/
1381     981,
1382 /**/
1383     980,
1384 /**/
1385     979,
1386 /**/
1387     978,
1388 /**/
1389     977,
1390 /**/
1391     976,
1392 /**/
1393     975,
1394 /**/
1395     974,
1396 /**/
1397     973,
1398 /**/
1399     972,
1400 /**/
1401     971,
1402 /**/
1403     970,
1404 /**/
1405     969,
1406 /**/
1407     968,
1408 /**/
1409     967,
1410 /**/
1411     966,
1412 /**/
1413     965,
1414 /**/
1415     964,
1416 /**/
1417     963,
1418 /**/
1419     962,
1420 /**/
1421     961,
1422 /**/
1423     960,
1424 /**/
1425     959,
1426 /**/
1427     958,
1428 /**/
1429     957,
1430 /**/
1431     956,
1432 /**/
1433     955,
1434 /**/
1435     954,
1436 /**/
1437     953,
1438 /**/
1439     952,
1440 /**/
1441     951,
1442 /**/
1443     950,
1444 /**/
1445     949,
1446 /**/
1447     948,
1448 /**/
1449     947,
1450 /**/
1451     946,
1452 /**/
1453     945,
1454 /**/
1455     944,
1456 /**/
1457     943,
1458 /**/
1459     942,
1460 /**/
1461     941,
1462 /**/
1463     940,
1464 /**/
1465     939,
1466 /**/
1467     938,
1468 /**/
1469     937,
1470 /**/
1471     936,
1472 /**/
1473     935,
1474 /**/
1475     934,
1476 /**/
1477     933,
1478 /**/
1479     932,
1480 /**/
1481     931,
1482 /**/
1483     930,
1484 /**/
1485     929,
1486 /**/
1487     928,
1488 /**/
1489     927,
1490 /**/
1491     926,
1492 /**/
1493     925,
1494 /**/
1495     924,
1496 /**/
1497     923,
1498 /**/
1499     922,
1500 /**/
1501     921,
1502 /**/
1503     920,
1504 /**/
1505     919,
1506 /**/
1507     918,
1508 /**/
1509     917,
1510 /**/
1511     916,
1512 /**/
1513     915,
1514 /**/
1515     914,
1516 /**/
1517     913,
1518 /**/
1519     912,
1520 /**/
1521     911,
1522 /**/
1523     910,
1524 /**/
1525     909,
1526 /**/
1527     908,
1528 /**/
1529     907,
1530 /**/
1531     906,
1532 /**/
1533     905,
1534 /**/
1535     904,
1536 /**/
1537     903,
1538 /**/
1539     902,
1540 /**/
1541     901,
1542 /**/
1543     900,
1544 /**/
1545     899,
1546 /**/
1547     898,
1548 /**/
1549     897,
1550 /**/
1551     896,
1552 /**/
1553     895,
1554 /**/
1555     894,
1556 /**/
1557     893,
1558 /**/
1559     892,
1560 /**/
1561     891,
1562 /**/
1563     890,
1564 /**/
1565     889,
1566 /**/
1567     888,
1568 /**/
1569     887,
1570 /**/
1571     886,
1572 /**/
1573     885,
1574 /**/
1575     884,
1576 /**/
1577     883,
1578 /**/
1579     882,
1580 /**/
1581     881,
1582 /**/
1583     880,
1584 /**/
1585     879,
1586 /**/
1587     878,
1588 /**/
1589     877,
1590 /**/
1591     876,
1592 /**/
1593     875,
1594 /**/
1595     874,
1596 /**/
1597     873,
1598 /**/
1599     872,
1600 /**/
1601     871,
1602 /**/
1603     870,
1604 /**/
1605     869,
1606 /**/
1607     868,
1608 /**/
1609     867,
1610 /**/
1611     866,
1612 /**/
1613     865,
1614 /**/
1615     864,
1616 /**/
1617     863,
1618 /**/
1619     862,
1620 /**/
1621     861,
1622 /**/
1623     860,
1624 /**/
1625     859,
1626 /**/
1627     858,
1628 /**/
1629     857,
1630 /**/
1631     856,
1632 /**/
1633     855,
1634 /**/
1635     854,
1636 /**/
1637     853,
1638 /**/
1639     852,
1640 /**/
1641     851,
1642 /**/
1643     850,
1644 /**/
1645     849,
1646 /**/
1647     848,
1648 /**/
1649     847,
1650 /**/
1651     846,
1652 /**/
1653     845,
1654 /**/
1655     844,
1656 /**/
1657     843,
1658 /**/
1659     842,
1660 /**/
1661     841,
1662 /**/
1663     840,
1664 /**/
1665     839,
1666 /**/
1667     838,
1668 /**/
1669     837,
1670 /**/
1671     836,
1672 /**/
1673     835,
1674 /**/
1675     834,
1676 /**/
1677     833,
1678 /**/
1679     832,
1680 /**/
1681     831,
1682 /**/
1683     830,
1684 /**/
1685     829,
1686 /**/
1687     828,
1688 /**/
1689     827,
1690 /**/
1691     826,
1692 /**/
1693     825,
1694 /**/
1695     824,
1696 /**/
1697     823,
1698 /**/
1699     822,
1700 /**/
1701     821,
1702 /**/
1703     820,
1704 /**/
1705     819,
1706 /**/
1707     818,
1708 /**/
1709     817,
1710 /**/
1711     816,
1712 /**/
1713     815,
1714 /**/
1715     814,
1716 /**/
1717     813,
1718 /**/
1719     812,
1720 /**/
1721     811,
1722 /**/
1723     810,
1724 /**/
1725     809,
1726 /**/
1727     808,
1728 /**/
1729     807,
1730 /**/
1731     806,
1732 /**/
1733     805,
1734 /**/
1735     804,
1736 /**/
1737     803,
1738 /**/
1739     802,
1740 /**/
1741     801,
1742 /**/
1743     800,
1744 /**/
1745     799,
1746 /**/
1747     798,
1748 /**/
1749     797,
1750 /**/
1751     796,
1752 /**/
1753     795,
1754 /**/
1755     794,
1756 /**/
1757     793,
1758 /**/
1759     792,
1760 /**/
1761     791,
1762 /**/
1763     790,
1764 /**/
1765     789,
1766 /**/
1767     788,
1768 /**/
1769     787,
1770 /**/
1771     786,
1772 /**/
1773     785,
1774 /**/
1775     784,
1776 /**/
1777     783,
1778 /**/
1779     782,
1780 /**/
1781     781,
1782 /**/
1783     780,
1784 /**/
1785     779,
1786 /**/
1787     778,
1788 /**/
1789     777,
1790 /**/
1791     776,
1792 /**/
1793     775,
1794 /**/
1795     774,
1796 /**/
1797     773,
1798 /**/
1799     772,
1800 /**/
1801     771,
1802 /**/
1803     770,
1804 /**/
1805     769,
1806 /**/
1807     768,
1808 /**/
1809     767,
1810 /**/
1811     766,
1812 /**/
1813     765,
1814 /**/
1815     764,
1816 /**/
1817     763,
1818 /**/
1819     762,
1820 /**/
1821     761,
1822 /**/
1823     760,
1824 /**/
1825     759,
1826 /**/
1827     758,
1828 /**/
1829     757,
1830 /**/
1831     756,
1832 /**/
1833     755,
1834 /**/
1835     754,
1836 /**/
1837     753,
1838 /**/
1839     752,
1840 /**/
1841     751,
1842 /**/
1843     750,
1844 /**/
1845     749,
1846 /**/
1847     748,
1848 /**/
1849     747,
1850 /**/
1851     746,
1852 /**/
1853     745,
1854 /**/
1855     744,
1856 /**/
1857     743,
1858 /**/
1859     742,
1860 /**/
1861     741,
1862 /**/
1863     740,
1864 /**/
1865     739,
1866 /**/
1867     738,
1868 /**/
1869     737,
1870 /**/
1871     736,
1872 /**/
1873     735,
1874 /**/
1875     734,
1876 /**/
1877     733,
1878 /**/
1879     732,
1880 /**/
1881     731,
1882 /**/
1883     730,
1884 /**/
1885     729,
1886 /**/
1887     728,
1888 /**/
1889     727,
1890 /**/
1891     726,
1892 /**/
1893     725,
1894 /**/
1895     724,
1896 /**/
1897     723,
1898 /**/
1899     722,
1900 /**/
1901     721,
1902 /**/
1903     720,
1904 /**/
1905     719,
1906 /**/
1907     718,
1908 /**/
1909     717,
1910 /**/
1911     716,
1912 /**/
1913     715,
1914 /**/
1915     714,
1916 /**/
1917     713,
1918 /**/
1919     712,
1920 /**/
1921     711,
1922 /**/
1923     710,
1924 /**/
1925     709,
1926 /**/
1927     708,
1928 /**/
1929     707,
1930 /**/
1931     706,
1932 /**/
1933     705,
1934 /**/
1935     704,
1936 /**/
1937     703,
1938 /**/
1939     702,
1940 /**/
1941     701,
1942 /**/
1943     700,
1944 /**/
1945     699,
1946 /**/
1947     698,
1948 /**/
1949     697,
1950 /**/
1951     696,
1952 /**/
1953     695,
1954 /**/
1955     694,
1956 /**/
1957     693,
1958 /**/
1959     692,
1960 /**/
1961     691,
1962 /**/
1963     690,
1964 /**/
1965     689,
1966 /**/
1967     688,
1968 /**/
1969     687,
1970 /**/
1971     686,
1972 /**/
1973     685,
1974 /**/
1975     684,
1976 /**/
1977     683,
1978 /**/
1979     682,
1980 /**/
1981     681,
1982 /**/
1983     680,
1984 /**/
1985     679,
1986 /**/
1987     678,
1988 /**/
1989     677,
1990 /**/
1991     676,
1992 /**/
1993     675,
1994 /**/
1995     674,
1996 /**/
1997     673,
1998 /**/
1999     672,
2000 /**/
2001     671,
2002 /**/
2003     670,
2004 /**/
2005     669,
2006 /**/
2007     668,
2008 /**/
2009     667,
2010 /**/
2011     666,
2012 /**/
2013     665,
2014 /**/
2015     664,
2016 /**/
2017     663,
2018 /**/
2019     662,
2020 /**/
2021     661,
2022 /**/
2023     660,
2024 /**/
2025     659,
2026 /**/
2027     658,
2028 /**/
2029     657,
2030 /**/
2031     656,
2032 /**/
2033     655,
2034 /**/
2035     654,
2036 /**/
2037     653,
2038 /**/
2039     652,
2040 /**/
2041     651,
2042 /**/
2043     650,
2044 /**/
2045     649,
2046 /**/
2047     648,
2048 /**/
2049     647,
2050 /**/
2051     646,
2052 /**/
2053     645,
2054 /**/
2055     644,
2056 /**/
2057     643,
2058 /**/
2059     642,
2060 /**/
2061     641,
2062 /**/
2063     640,
2064 /**/
2065     639,
2066 /**/
2067     638,
2068 /**/
2069     637,
2070 /**/
2071     636,
2072 /**/
2073     635,
2074 /**/
2075     634,
2076 /**/
2077     633,
2078 /**/
2079     632,
2080 /**/
2081     631,
2082 /**/
2083     630,
2084 /**/
2085     629,
2086 /**/
2087     628,
2088 /**/
2089     627,
2090 /**/
2091     626,
2092 /**/
2093     625,
2094 /**/
2095     624,
2096 /**/
2097     623,
2098 /**/
2099     622,
2100 /**/
2101     621,
2102 /**/
2103     620,
2104 /**/
2105     619,
2106 /**/
2107     618,
2108 /**/
2109     617,
2110 /**/
2111     616,
2112 /**/
2113     615,
2114 /**/
2115     614,
2116 /**/
2117     613,
2118 /**/
2119     612,
2120 /**/
2121     611,
2122 /**/
2123     610,
2124 /**/
2125     609,
2126 /**/
2127     608,
2128 /**/
2129     607,
2130 /**/
2131     606,
2132 /**/
2133     605,
2134 /**/
2135     604,
2136 /**/
2137     603,
2138 /**/
2139     602,
2140 /**/
2141     601,
2142 /**/
2143     600,
2144 /**/
2145     599,
2146 /**/
2147     598,
2148 /**/
2149     597,
2150 /**/
2151     596,
2152 /**/
2153     595,
2154 /**/
2155     594,
2156 /**/
2157     593,
2158 /**/
2159     592,
2160 /**/
2161     591,
2162 /**/
2163     590,
2164 /**/
2165     589,
2166 /**/
2167     588,
2168 /**/
2169     587,
2170 /**/
2171     586,
2172 /**/
2173     585,
2174 /**/
2175     584,
2176 /**/
2177     583,
2178 /**/
2179     582,
2180 /**/
2181     581,
2182 /**/
2183     580,
2184 /**/
2185     579,
2186 /**/
2187     578,
2188 /**/
2189     577,
2190 /**/
2191     576,
2192 /**/
2193     575,
2194 /**/
2195     574,
2196 /**/
2197     573,
2198 /**/
2199     572,
2200 /**/
2201     571,
2202 /**/
2203     570,
2204 /**/
2205     569,
2206 /**/
2207     568,
2208 /**/
2209     567,
2210 /**/
2211     566,
2212 /**/
2213     565,
2214 /**/
2215     564,
2216 /**/
2217     563,
2218 /**/
2219     562,
2220 /**/
2221     561,
2222 /**/
2223     560,
2224 /**/
2225     559,
2226 /**/
2227     558,
2228 /**/
2229     557,
2230 /**/
2231     556,
2232 /**/
2233     555,
2234 /**/
2235     554,
2236 /**/
2237     553,
2238 /**/
2239     552,
2240 /**/
2241     551,
2242 /**/
2243     550,
2244 /**/
2245     549,
2246 /**/
2247     548,
2248 /**/
2249     547,
2250 /**/
2251     546,
2252 /**/
2253     545,
2254 /**/
2255     544,
2256 /**/
2257     543,
2258 /**/
2259     542,
2260 /**/
2261     541,
2262 /**/
2263     540,
2264 /**/
2265     539,
2266 /**/
2267     538,
2268 /**/
2269     537,
2270 /**/
2271     536,
2272 /**/
2273     535,
2274 /**/
2275     534,
2276 /**/
2277     533,
2278 /**/
2279     532,
2280 /**/
2281     531,
2282 /**/
2283     530,
2284 /**/
2285     529,
2286 /**/
2287     528,
2288 /**/
2289     527,
2290 /**/
2291     526,
2292 /**/
2293     525,
2294 /**/
2295     524,
2296 /**/
2297     523,
2298 /**/
2299     522,
2300 /**/
2301     521,
2302 /**/
2303     520,
2304 /**/
2305     519,
2306 /**/
2307     518,
2308 /**/
2309     517,
2310 /**/
2311     516,
2312 /**/
2313     515,
2314 /**/
2315     514,
2316 /**/
2317     513,
2318 /**/
2319     512,
2320 /**/
2321     511,
2322 /**/
2323     510,
2324 /**/
2325     509,
2326 /**/
2327     508,
2328 /**/
2329     507,
2330 /**/
2331     506,
2332 /**/
2333     505,
2334 /**/
2335     504,
2336 /**/
2337     503,
2338 /**/
2339     502,
2340 /**/
2341     501,
2342 /**/
2343     500,
2344 /**/
2345     499,
2346 /**/
2347     498,
2348 /**/
2349     497,
2350 /**/
2351     496,
2352 /**/
2353     495,
2354 /**/
2355     494,
2356 /**/
2357     493,
2358 /**/
2359     492,
2360 /**/
2361     491,
2362 /**/
2363     490,
2364 /**/
2365     489,
2366 /**/
2367     488,
2368 /**/
2369     487,
2370 /**/
2371     486,
2372 /**/
2373     485,
2374 /**/
2375     484,
2376 /**/
2377     483,
2378 /**/
2379     482,
2380 /**/
2381     481,
2382 /**/
2383     480,
2384 /**/
2385     479,
2386 /**/
2387     478,
2388 /**/
2389     477,
2390 /**/
2391     476,
2392 /**/
2393     475,
2394 /**/
2395     474,
2396 /**/
2397     473,
2398 /**/
2399     472,
2400 /**/
2401     471,
2402 /**/
2403     470,
2404 /**/
2405     469,
2406 /**/
2407     468,
2408 /**/
2409     467,
2410 /**/
2411     466,
2412 /**/
2413     465,
2414 /**/
2415     464,
2416 /**/
2417     463,
2418 /**/
2419     462,
2420 /**/
2421     461,
2422 /**/
2423     460,
2424 /**/
2425     459,
2426 /**/
2427     458,
2428 /**/
2429     457,
2430 /**/
2431     456,
2432 /**/
2433     455,
2434 /**/
2435     454,
2436 /**/
2437     453,
2438 /**/
2439     452,
2440 /**/
2441     451,
2442 /**/
2443     450,
2444 /**/
2445     449,
2446 /**/
2447     448,
2448 /**/
2449     447,
2450 /**/
2451     446,
2452 /**/
2453     445,
2454 /**/
2455     444,
2456 /**/
2457     443,
2458 /**/
2459     442,
2460 /**/
2461     441,
2462 /**/
2463     440,
2464 /**/
2465     439,
2466 /**/
2467     438,
2468 /**/
2469     437,
2470 /**/
2471     436,
2472 /**/
2473     435,
2474 /**/
2475     434,
2476 /**/
2477     433,
2478 /**/
2479     432,
2480 /**/
2481     431,
2482 /**/
2483     430,
2484 /**/
2485     429,
2486 /**/
2487     428,
2488 /**/
2489     427,
2490 /**/
2491     426,
2492 /**/
2493     425,
2494 /**/
2495     424,
2496 /**/
2497     423,
2498 /**/
2499     422,
2500 /**/
2501     421,
2502 /**/
2503     420,
2504 /**/
2505     419,
2506 /**/
2507     418,
2508 /**/
2509     417,
2510 /**/
2511     416,
2512 /**/
2513     415,
2514 /**/
2515     414,
2516 /**/
2517     413,
2518 /**/
2519     412,
2520 /**/
2521     411,
2522 /**/
2523     410,
2524 /**/
2525     409,
2526 /**/
2527     408,
2528 /**/
2529     407,
2530 /**/
2531     406,
2532 /**/
2533     405,
2534 /**/
2535     404,
2536 /**/
2537     403,
2538 /**/
2539     402,
2540 /**/
2541     401,
2542 /**/
2543     400,
2544 /**/
2545     399,
2546 /**/
2547     398,
2548 /**/
2549     397,
2550 /**/
2551     396,
2552 /**/
2553     395,
2554 /**/
2555     394,
2556 /**/
2557     393,
2558 /**/
2559     392,
2560 /**/
2561     391,
2562 /**/
2563     390,
2564 /**/
2565     389,
2566 /**/
2567     388,
2568 /**/
2569     387,
2570 /**/
2571     386,
2572 /**/
2573     385,
2574 /**/
2575     384,
2576 /**/
2577     383,
2578 /**/
2579     382,
2580 /**/
2581     381,
2582 /**/
2583     380,
2584 /**/
2585     379,
2586 /**/
2587     378,
2588 /**/
2589     377,
2590 /**/
2591     376,
2592 /**/
2593     375,
2594 /**/
2595     374,
2596 /**/
2597     373,
2598 /**/
2599     372,
2600 /**/
2601     371,
2602 /**/
2603     370,
2604 /**/
2605     369,
2606 /**/
2607     368,
2608 /**/
2609     367,
2610 /**/
2611     366,
2612 /**/
2613     365,
2614 /**/
2615     364,
2616 /**/
2617     363,
2618 /**/
2619     362,
2620 /**/
2621     361,
2622 /**/
2623     360,
2624 /**/
2625     359,
2626 /**/
2627     358,
2628 /**/
2629     357,
2630 /**/
2631     356,
2632 /**/
2633     355,
2634 /**/
2635     354,
2636 /**/
2637     353,
2638 /**/
2639     352,
2640 /**/
2641     351,
2642 /**/
2643     350,
2644 /**/
2645     349,
2646 /**/
2647     348,
2648 /**/
2649     347,
2650 /**/
2651     346,
2652 /**/
2653     345,
2654 /**/
2655     344,
2656 /**/
2657     343,
2658 /**/
2659     342,
2660 /**/
2661     341,
2662 /**/
2663     340,
2664 /**/
2665     339,
2666 /**/
2667     338,
2668 /**/
2669     337,
2670 /**/
2671     336,
2672 /**/
2673     335,
2674 /**/
2675     334,
2676 /**/
2677     333,
2678 /**/
2679     332,
2680 /**/
2681     331,
2682 /**/
2683     330,
2684 /**/
2685     329,
2686 /**/
2687     328,
2688 /**/
2689     327,
2690 /**/
2691     326,
2692 /**/
2693     325,
2694 /**/
2695     324,
2696 /**/
2697     323,
2698 /**/
2699     322,
2700 /**/
2701     321,
2702 /**/
2703     320,
2704 /**/
2705     319,
2706 /**/
2707     318,
2708 /**/
2709     317,
2710 /**/
2711     316,
2712 /**/
2713     315,
2714 /**/
2715     314,
2716 /**/
2717     313,
2718 /**/
2719     312,
2720 /**/
2721     311,
2722 /**/
2723     310,
2724 /**/
2725     309,
2726 /**/
2727     308,
2728 /**/
2729     307,
2730 /**/
2731     306,
2732 /**/
2733     305,
2734 /**/
2735     304,
2736 /**/
2737     303,
2738 /**/
2739     302,
2740 /**/
2741     301,
2742 /**/
2743     300,
2744 /**/
2745     299,
2746 /**/
2747     298,
2748 /**/
2749     297,
2750 /**/
2751     296,
2752 /**/
2753     295,
2754 /**/
2755     294,
2756 /**/
2757     293,
2758 /**/
2759     292,
2760 /**/
2761     291,
2762 /**/
2763     290,
2764 /**/
2765     289,
2766 /**/
2767     288,
2768 /**/
2769     287,
2770 /**/
2771     286,
2772 /**/
2773     285,
2774 /**/
2775     284,
2776 /**/
2777     283,
2778 /**/
2779     282,
2780 /**/
2781     281,
2782 /**/
2783     280,
2784 /**/
2785     279,
2786 /**/
2787     278,
2788 /**/
2789     277,
2790 /**/
2791     276,
2792 /**/
2793     275,
2794 /**/
2795     274,
2796 /**/
2797     273,
2798 /**/
2799     272,
2800 /**/
2801     271,
2802 /**/
2803     270,
2804 /**/
2805     269,
2806 /**/
2807     268,
2808 /**/
2809     267,
2810 /**/
2811     266,
2812 /**/
2813     265,
2814 /**/
2815     264,
2816 /**/
2817     263,
2818 /**/
2819     262,
2820 /**/
2821     261,
2822 /**/
2823     260,
2824 /**/
2825     259,
2826 /**/
2827     258,
2828 /**/
2829     257,
2830 /**/
2831     256,
2832 /**/
2833     255,
2834 /**/
2835     254,
2836 /**/
2837     253,
2838 /**/
2839     252,
2840 /**/
2841     251,
2842 /**/
2843     250,
2844 /**/
2845     249,
2846 /**/
2847     248,
2848 /**/
2849     247,
2850 /**/
2851     246,
2852 /**/
2853     245,
2854 /**/
2855     244,
2856 /**/
2857     243,
2858 /**/
2859     242,
2860 /**/
2861     241,
2862 /**/
2863     240,
2864 /**/
2865     239,
2866 /**/
2867     238,
2868 /**/
2869     237,
2870 /**/
2871     236,
2872 /**/
2873     235,
2874 /**/
2875     234,
2876 /**/
2877     233,
2878 /**/
2879     232,
2880 /**/
2881     231,
2882 /**/
2883     230,
2884 /**/
2885     229,
2886 /**/
2887     228,
2888 /**/
2889     227,
2890 /**/
2891     226,
2892 /**/
2893     225,
2894 /**/
2895     224,
2896 /**/
2897     223,
2898 /**/
2899     222,
2900 /**/
2901     221,
2902 /**/
2903     220,
2904 /**/
2905     219,
2906 /**/
2907     218,
2908 /**/
2909     217,
2910 /**/
2911     216,
2912 /**/
2913     215,
2914 /**/
2915     214,
2916 /**/
2917     213,
2918 /**/
2919     212,
2920 /**/
2921     211,
2922 /**/
2923     210,
2924 /**/
2925     209,
2926 /**/
2927     208,
2928 /**/
2929     207,
2930 /**/
2931     206,
2932 /**/
2933     205,
2934 /**/
2935     204,
2936 /**/
2937     203,
2938 /**/
2939     202,
2940 /**/
2941     201,
2942 /**/
2943     200,
2944 /**/
2945     199,
2946 /**/
2947     198,
2948 /**/
2949     197,
2950 /**/
2951     196,
2952 /**/
2953     195,
2954 /**/
2955     194,
2956 /**/
2957     193,
2958 /**/
2959     192,
2960 /**/
2961     191,
2962 /**/
2963     190,
2964 /**/
2965     189,
2966 /**/
2967     188,
2968 /**/
2969     187,
2970 /**/
2971     186,
2972 /**/
2973     185,
2974 /**/
2975     184,
2976 /**/
2977     183,
2978 /**/
2979     182,
2980 /**/
2981     181,
2982 /**/
2983     180,
2984 /**/
2985     179,
2986 /**/
2987     178,
2988 /**/
2989     177,
2990 /**/
2991     176,
2992 /**/
2993     175,
2994 /**/
2995     174,
2996 /**/
2997     173,
2998 /**/
2999     172,
3000 /**/
3001     171,
3002 /**/
3003     170,
3004 /**/
3005     169,
3006 /**/
3007     168,
3008 /**/
3009     167,
3010 /**/
3011     166,
3012 /**/
3013     165,
3014 /**/
3015     164,
3016 /**/
3017     163,
3018 /**/
3019     162,
3020 /**/
3021     161,
3022 /**/
3023     160,
3024 /**/
3025     159,
3026 /**/
3027     158,
3028 /**/
3029     157,
3030 /**/
3031     156,
3032 /**/
3033     155,
3034 /**/
3035     154,
3036 /**/
3037     153,
3038 /**/
3039     152,
3040 /**/
3041     151,
3042 /**/
3043     150,
3044 /**/
3045     149,
3046 /**/
3047     148,
3048 /**/
3049     147,
3050 /**/
3051     146,
3052 /**/
3053     145,
3054 /**/
3055     144,
3056 /**/
3057     143,
3058 /**/
3059     142,
3060 /**/
3061     141,
3062 /**/
3063     140,
3064 /**/
3065     139,
3066 /**/
3067     138,
3068 /**/
3069     137,
3070 /**/
3071     136,
3072 /**/
3073     135,
3074 /**/
3075     134,
3076 /**/
3077     133,
3078 /**/
3079     132,
3080 /**/
3081     131,
3082 /**/
3083     130,
3084 /**/
3085     129,
3086 /**/
3087     128,
3088 /**/
3089     127,
3090 /**/
3091     126,
3092 /**/
3093     125,
3094 /**/
3095     124,
3096 /**/
3097     123,
3098 /**/
3099     122,
3100 /**/
3101     121,
3102 /**/
3103     120,
3104 /**/
3105     119,
3106 /**/
3107     118,
3108 /**/
3109     117,
3110 /**/
3111     116,
3112 /**/
3113     115,
3114 /**/
3115     114,
3116 /**/
3117     113,
3118 /**/
3119     112,
3120 /**/
3121     111,
3122 /**/
3123     110,
3124 /**/
3125     109,
3126 /**/
3127     108,
3128 /**/
3129     107,
3130 /**/
3131     106,
3132 /**/
3133     105,
3134 /**/
3135     104,
3136 /**/
3137     103,
3138 /**/
3139     102,
3140 /**/
3141     101,
3142 /**/
3143     100,
3144 /**/
3145     99,
3146 /**/
3147     98,
3148 /**/
3149     97,
3150 /**/
3151     96,
3152 /**/
3153     95,
3154 /**/
3155     94,
3156 /**/
3157     93,
3158 /**/
3159     92,
3160 /**/
3161     91,
3162 /**/
3163     90,
3164 /**/
3165     89,
3166 /**/
3167     88,
3168 /**/
3169     87,
3170 /**/
3171     86,
3172 /**/
3173     85,
3174 /**/
3175     84,
3176 /**/
3177     83,
3178 /**/
3179     82,
3180 /**/
3181     81,
3182 /**/
3183     80,
3184 /**/
3185     79,
3186 /**/
3187     78,
3188 /**/
3189     77,
3190 /**/
3191     76,
3192 /**/
3193     75,
3194 /**/
3195     74,
3196 /**/
3197     73,
3198 /**/
3199     72,
3200 /**/
3201     71,
3202 /**/
3203     70,
3204 /**/
3205     69,
3206 /**/
3207     68,
3208 /**/
3209     67,
3210 /**/
3211     66,
3212 /**/
3213     65,
3214 /**/
3215     64,
3216 /**/
3217     63,
3218 /**/
3219     62,
3220 /**/
3221     61,
3222 /**/
3223     60,
3224 /**/
3225     59,
3226 /**/
3227     58,
3228 /**/
3229     57,
3230 /**/
3231     56,
3232 /**/
3233     55,
3234 /**/
3235     54,
3236 /**/
3237     53,
3238 /**/
3239     52,
3240 /**/
3241     51,
3242 /**/
3243     50,
3244 /**/
3245     49,
3246 /**/
3247     48,
3248 /**/
3249     47,
3250 /**/
3251     46,
3252 /**/
3253     45,
3254 /**/
3255     44,
3256 /**/
3257     43,
3258 /**/
3259     42,
3260 /**/
3261     41,
3262 /**/
3263     40,
3264 /**/
3265     39,
3266 /**/
3267     38,
3268 /**/
3269     37,
3270 /**/
3271     36,
3272 /**/
3273     35,
3274 /**/
3275     34,
3276 /**/
3277     33,
3278 /**/
3279     32,
3280 /**/
3281     31,
3282 /**/
3283     30,
3284 /**/
3285     29,
3286 /**/
3287     28,
3288 /**/
3289     27,
3290 /**/
3291     26,
3292 /**/
3293     25,
3294 /**/
3295     24,
3296 /**/
3297     23,
3298 /**/
3299     22,
3300 /**/
3301     21,
3302 /**/
3303     20,
3304 /**/
3305     19,
3306 /**/
3307     18,
3308 /**/
3309     17,
3310 /**/
3311     16,
3312 /**/
3313     15,
3314 /**/
3315     14,
3316 /**/
3317     13,
3318 /**/
3319     12,
3320 /**/
3321     11,
3322 /**/
3323     10,
3324 /**/
3325     9,
3326 /**/
3327     8,
3328 /**/
3329     7,
3330 /**/
3331     6,
3332 /**/
3333     5,
3334 /**/
3335     4,
3336 /**/
3337     3,
3338 /**/
3339     2,
3340 /**/
3341     1,
3342 /**/
3343     0
3344 };
3345
3346 /*
3347  * Place to put a short description when adding a feature with a patch.
3348  * Keep it short, e.g.,: "relative numbers", "persistent undo".
3349  * Also add a comment marker to separate the lines.
3350  * See the official Vim patches for the diff format: It must use a context of
3351  * one line only.  Create it by hand or use "diff -C2" and edit the patch.
3352  */
3353 static char *(extra_patches[]) =
3354 {   /* Add your patch description below this line */
3355 /**/
3356     NULL
3357 };
3358
3359     int
3360 highest_patch(void)
3361 {
3362     // this relies on the highest patch number to be the first entry
3363     return included_patches[0];
3364 }
3365
3366 #if defined(FEAT_EVAL) || defined(PROTO)
3367 /*
3368  * Return TRUE if patch "n" has been included.
3369  */
3370     int
3371 has_patch(int n)
3372 {
3373     int         h, m, l;
3374
3375     // Perform a binary search.
3376     l = 0;
3377     h = (int)ARRAY_LENGTH(included_patches) - 1;
3378     for (;;)
3379     {
3380         m = (l + h) / 2;
3381         if (included_patches[m] == n)
3382             return TRUE;
3383         if (l == h)
3384             break;
3385         if (included_patches[m] < n)
3386             h = m;
3387         else
3388             l = m + 1;
3389     }
3390     return FALSE;
3391 }
3392 #endif
3393
3394     void
3395 ex_version(exarg_T *eap)
3396 {
3397     /*
3398      * Ignore a ":version 9.99" command.
3399      */
3400     if (*eap->arg == NUL)
3401     {
3402         msg_putchar('\n');
3403         list_version();
3404     }
3405 }
3406
3407 /*
3408  * Output a string for the version message.  If it's going to wrap, output a
3409  * newline, unless the message is too long to fit on the screen anyway.
3410  * When "wrap" is TRUE wrap the string in [].
3411  */
3412     static void
3413 version_msg_wrap(char_u *s, int wrap)
3414 {
3415     int         len = vim_strsize(s) + (wrap ? 2 : 0);
3416
3417     if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns
3418                                                                 && *s != '\n')
3419         msg_putchar('\n');
3420     if (!got_int)
3421     {
3422         if (wrap)
3423             msg_puts("[");
3424         msg_puts((char *)s);
3425         if (wrap)
3426             msg_puts("]");
3427     }
3428 }
3429
3430     static void
3431 version_msg(char *s)
3432 {
3433     version_msg_wrap((char_u *)s, FALSE);
3434 }
3435
3436 /*
3437  * List all features aligned in columns, dictionary style.
3438  */
3439     static void
3440 list_features(void)
3441 {
3442     list_in_columns((char_u **)features, -1, -1);
3443 }
3444
3445 /*
3446  * List string items nicely aligned in columns.
3447  * When "size" is < 0 then the last entry is marked with NULL.
3448  * The entry with index "current" is inclosed in [].
3449  */
3450     void
3451 list_in_columns(char_u **items, int size, int current)
3452 {
3453     int         i;
3454     int         ncol;
3455     int         nrow;
3456     int         cur_row = 1;
3457     int         item_count = 0;
3458     int         width = 0;
3459 #ifdef FEAT_SYN_HL
3460     int         use_highlight = (items == (char_u **)features);
3461 #endif
3462
3463     // Find the length of the longest item, use that + 1 as the column
3464     // width.
3465     for (i = 0; size < 0 ? items[i] != NULL : i < size; ++i)
3466     {
3467         int l = vim_strsize(items[i]) + (i == current ? 2 : 0);
3468
3469         if (l > width)
3470             width = l;
3471         ++item_count;
3472     }
3473     width += 1;
3474
3475     if (Columns < width)
3476     {
3477         // Not enough screen columns - show one per line
3478         for (i = 0; i < item_count; ++i)
3479         {
3480             version_msg_wrap(items[i], i == current);
3481             if (msg_col > 0 && i < item_count - 1)
3482                 msg_putchar('\n');
3483         }
3484         return;
3485     }
3486
3487     // The rightmost column doesn't need a separator.
3488     // Sacrifice it to fit in one more column if possible.
3489     ncol = (int) (Columns + 1) / width;
3490     nrow = item_count / ncol + ((item_count % ncol) ? 1 : 0);
3491
3492     // "i" counts columns then rows.  "idx" counts rows then columns.
3493     for (i = 0; !got_int && i < nrow * ncol; ++i)
3494     {
3495         int idx = (i / ncol) + (i % ncol) * nrow;
3496
3497         if (idx < item_count)
3498         {
3499             int last_col = (i + 1) % ncol == 0;
3500
3501             if (idx == current)
3502                 msg_putchar('[');
3503 #ifdef FEAT_SYN_HL
3504             if (use_highlight && items[idx][0] == '-')
3505                 msg_puts_attr((char *)items[idx], HL_ATTR(HLF_W));
3506             else
3507 #endif
3508                 msg_puts((char *)items[idx]);
3509             if (idx == current)
3510                 msg_putchar(']');
3511             if (last_col)
3512             {
3513                 if (msg_col > 0 && cur_row < nrow)
3514                     msg_putchar('\n');
3515                 ++cur_row;
3516             }
3517             else
3518             {
3519                 while (msg_col % width)
3520                     msg_putchar(' ');
3521             }
3522         }
3523         else
3524         {
3525             // this row is out of items, thus at the end of the row
3526             if (msg_col > 0)
3527             {
3528                 if (cur_row < nrow)
3529                     msg_putchar('\n');
3530                 ++cur_row;
3531             }
3532         }
3533     }
3534 }
3535
3536     void
3537 list_version(void)
3538 {
3539     int         i;
3540     int         first;
3541     char        *s = "";
3542
3543     /*
3544      * When adding features here, don't forget to update the list of
3545      * internal variables in eval.c!
3546      */
3547     init_longVersion();
3548     msg(longVersion);
3549 #ifdef MSWIN
3550 # ifdef FEAT_GUI_MSWIN
3551 #  ifdef VIMDLL
3552 #   ifdef _WIN64
3553     msg_puts(_("\nMS-Windows 64-bit GUI/console version"));
3554 #   else
3555     msg_puts(_("\nMS-Windows 32-bit GUI/console version"));
3556 #   endif
3557 #  else
3558 #   ifdef _WIN64
3559     msg_puts(_("\nMS-Windows 64-bit GUI version"));
3560 #   else
3561     msg_puts(_("\nMS-Windows 32-bit GUI version"));
3562 #   endif
3563 #  endif
3564 #  ifdef FEAT_OLE
3565     msg_puts(_(" with OLE support"));
3566 #  endif
3567 # else
3568 #  ifdef _WIN64
3569     msg_puts(_("\nMS-Windows 64-bit console version"));
3570 #  else
3571     msg_puts(_("\nMS-Windows 32-bit console version"));
3572 #  endif
3573 # endif
3574 #endif
3575 #if defined(MACOS_X)
3576 # if defined(MACOS_X_DARWIN)
3577     msg_puts(_("\nmacOS version"));
3578 # else
3579     msg_puts(_("\nmacOS version w/o darwin feat."));
3580 # endif
3581 # if defined(__arm64__)
3582     msg_puts(" - arm64");
3583 # elif defined(__x86_64__)
3584     msg_puts(" - x86_64");
3585 # endif
3586 #endif
3587
3588 #ifdef VMS
3589     msg_puts(_("\nOpenVMS version"));
3590 # ifdef HAVE_PATHDEF
3591     if (*compiled_arch != NUL)
3592     {
3593         msg_puts(" - ");
3594         msg_puts((char *)compiled_arch);
3595     }
3596 # endif
3597
3598 #endif
3599
3600     // Print the list of patch numbers if there is at least one.
3601     // Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45"
3602     if (included_patches[0] != 0)
3603     {
3604         msg_puts(_("\nIncluded patches: "));
3605         first = -1;
3606         i = (int)ARRAY_LENGTH(included_patches) - 1;
3607         while (--i >= 0)
3608         {
3609             if (first < 0)
3610                 first = included_patches[i];
3611             if (i == 0 || included_patches[i - 1] != included_patches[i] + 1)
3612             {
3613                 msg_puts(s);
3614                 s = ", ";
3615                 msg_outnum((long)first);
3616                 if (first != included_patches[i])
3617                 {
3618                     msg_puts("-");
3619                     msg_outnum((long)included_patches[i]);
3620                 }
3621                 first = -1;
3622             }
3623         }
3624     }
3625
3626     // Print the list of extra patch descriptions if there is at least one.
3627     if (extra_patches[0] != NULL)
3628     {
3629         msg_puts(_("\nExtra patches: "));
3630         s = "";
3631         for (i = 0; extra_patches[i] != NULL; ++i)
3632         {
3633             msg_puts(s);
3634             s = ", ";
3635             msg_puts(extra_patches[i]);
3636         }
3637     }
3638
3639 #ifdef MODIFIED_BY
3640     msg_puts("\n");
3641     msg_puts(_("Modified by "));
3642     msg_puts(MODIFIED_BY);
3643 #endif
3644
3645 #ifdef HAVE_PATHDEF
3646     if (*compiled_user != NUL || *compiled_sys != NUL)
3647     {
3648         msg_puts(_("\nCompiled "));
3649         if (*compiled_user != NUL)
3650         {
3651             msg_puts(_("by "));
3652             msg_puts((char *)compiled_user);
3653         }
3654         if (*compiled_sys != NUL)
3655         {
3656             msg_puts("@");
3657             msg_puts((char *)compiled_sys);
3658         }
3659     }
3660 #endif
3661
3662 #if defined(FEAT_HUGE)
3663     msg_puts(_("\nHuge version "));
3664 #elif defined(FEAT_NORMAL)
3665     msg_puts(_("\nNormal version "));
3666 #else
3667     msg_puts(_("\nTiny version "));
3668 #endif
3669 #if !defined(FEAT_GUI)
3670     msg_puts(_("without GUI."));
3671 #elif defined(FEAT_GUI_GTK)
3672 # if defined(USE_GTK3)
3673     msg_puts(_("with GTK3 GUI."));
3674 # elif defined(FEAT_GUI_GNOME)
3675      msg_puts(_("with GTK2-GNOME GUI."));
3676 # else
3677      msg_puts(_("with GTK2 GUI."));
3678 # endif
3679 #elif defined(FEAT_GUI_MOTIF)
3680     msg_puts(_("with X11-Motif GUI."));
3681 #elif defined(FEAT_GUI_HAIKU)
3682     msg_puts(_("with Haiku GUI."));
3683 #elif defined(FEAT_GUI_PHOTON)
3684     msg_puts(_("with Photon GUI."));
3685 #elif defined(MSWIN)
3686     msg_puts(_("with GUI."));
3687 #endif
3688     version_msg(_("  Features included (+) or not (-):\n"));
3689
3690     list_features();
3691     if (msg_col > 0)
3692         msg_putchar('\n');
3693
3694 #ifdef SYS_VIMRC_FILE
3695     version_msg(_("   system vimrc file: \""));
3696     version_msg(SYS_VIMRC_FILE);
3697     version_msg("\"\n");
3698 #endif
3699 #ifdef USR_VIMRC_FILE
3700     version_msg(_("     user vimrc file: \""));
3701     version_msg(USR_VIMRC_FILE);
3702     version_msg("\"\n");
3703 #endif
3704 #ifdef USR_VIMRC_FILE2
3705     version_msg(_(" 2nd user vimrc file: \""));
3706     version_msg(USR_VIMRC_FILE2);
3707     version_msg("\"\n");
3708 #endif
3709 #ifdef USR_VIMRC_FILE3
3710     version_msg(_(" 3rd user vimrc file: \""));
3711     version_msg(USR_VIMRC_FILE3);
3712     version_msg("\"\n");
3713 #endif
3714 #ifdef USR_EXRC_FILE
3715     version_msg(_("      user exrc file: \""));
3716     version_msg(USR_EXRC_FILE);
3717     version_msg("\"\n");
3718 #endif
3719 #ifdef USR_EXRC_FILE2
3720     version_msg(_("  2nd user exrc file: \""));
3721     version_msg(USR_EXRC_FILE2);
3722     version_msg("\"\n");
3723 #endif
3724 #ifdef FEAT_GUI
3725 # ifdef SYS_GVIMRC_FILE
3726     version_msg(_("  system gvimrc file: \""));
3727     version_msg(SYS_GVIMRC_FILE);
3728     version_msg("\"\n");
3729 # endif
3730     version_msg(_("    user gvimrc file: \""));
3731     version_msg(USR_GVIMRC_FILE);
3732     version_msg("\"\n");
3733 # ifdef USR_GVIMRC_FILE2
3734     version_msg(_("2nd user gvimrc file: \""));
3735     version_msg(USR_GVIMRC_FILE2);
3736     version_msg("\"\n");
3737 # endif
3738 # ifdef USR_GVIMRC_FILE3
3739     version_msg(_("3rd user gvimrc file: \""));
3740     version_msg(USR_GVIMRC_FILE3);
3741     version_msg("\"\n");
3742 # endif
3743 #endif
3744     version_msg(_("       defaults file: \""));
3745     version_msg(VIM_DEFAULTS_FILE);
3746     version_msg("\"\n");
3747 #ifdef FEAT_GUI
3748 # ifdef SYS_MENU_FILE
3749     version_msg(_("    system menu file: \""));
3750     version_msg(SYS_MENU_FILE);
3751     version_msg("\"\n");
3752 # endif
3753 #endif
3754 #ifdef HAVE_PATHDEF
3755     if (*default_vim_dir != NUL)
3756     {
3757         version_msg(_("  fall-back for $VIM: \""));
3758         version_msg((char *)default_vim_dir);
3759         version_msg("\"\n");
3760     }
3761     if (*default_vimruntime_dir != NUL)
3762     {
3763         version_msg(_(" f-b for $VIMRUNTIME: \""));
3764         version_msg((char *)default_vimruntime_dir);
3765         version_msg("\"\n");
3766     }
3767     version_msg(_("Compilation: "));
3768     version_msg((char *)all_cflags);
3769     version_msg("\n");
3770 #ifdef VMS
3771     if (*compiler_version != NUL)
3772     {
3773         version_msg(_("Compiler: "));
3774         version_msg((char *)compiler_version);
3775         version_msg("\n");
3776     }
3777 #endif
3778     version_msg(_("Linking: "));
3779     version_msg((char *)all_lflags);
3780 #endif
3781 #ifdef DEBUG
3782     version_msg("\n");
3783     version_msg(_("  DEBUG BUILD"));
3784 #endif
3785 }
3786
3787 static void do_intro_line(int row, char_u *mesg, int add_version, int attr);
3788 static void intro_message(int colon);
3789
3790 /*
3791  * Show the intro message when not editing a file.
3792  */
3793     void
3794 maybe_intro_message(void)
3795 {
3796     if (BUFEMPTY()
3797             && curbuf->b_fname == NULL
3798             && firstwin->w_next == NULL
3799             && vim_strchr(p_shm, SHM_INTRO) == NULL)
3800         intro_message(FALSE);
3801 }
3802
3803 /*
3804  * Give an introductory message about Vim.
3805  * Only used when starting Vim on an empty file, without a file name.
3806  * Or with the ":intro" command (for Sven :-).
3807  */
3808     static void
3809 intro_message(
3810     int         colon)          // TRUE for ":intro"
3811 {
3812     int         i;
3813     int         row;
3814     int         blanklines;
3815     int         sponsor;
3816     char        *p;
3817     static char *(lines[]) =
3818     {
3819         N_("VIM - Vi IMproved"),
3820         "",
3821         N_("version "),
3822         N_("by Bram Moolenaar et al."),
3823 #ifdef MODIFIED_BY
3824         " ",
3825 #endif
3826         N_("Vim is open source and freely distributable"),
3827         "",
3828         N_("Help poor children in Uganda!"),
3829         N_("type  :help iccf<Enter>       for information "),
3830         "",
3831         N_("type  :q<Enter>               to exit         "),
3832         N_("type  :help<Enter>  or  <F1>  for on-line help"),
3833         N_("type  :help version9<Enter>   for version info"),
3834         NULL,
3835         "",
3836         N_("Running in Vi compatible mode"),
3837         N_("type  :set nocp<Enter>        for Vim defaults"),
3838         N_("type  :help cp-default<Enter> for info on this"),
3839     };
3840 #ifdef FEAT_GUI
3841     static char *(gui_lines[]) =
3842     {
3843         NULL,
3844         NULL,
3845         NULL,
3846         NULL,
3847 #ifdef MODIFIED_BY
3848         NULL,
3849 #endif
3850         NULL,
3851         NULL,
3852         NULL,
3853         N_("menu  Help->Orphans           for information    "),
3854         NULL,
3855         N_("Running modeless, typed text is inserted"),
3856         N_("menu  Edit->Global Settings->Toggle Insert Mode  "),
3857         N_("                              for two modes      "),
3858         NULL,
3859         NULL,
3860         NULL,
3861         N_("menu  Edit->Global Settings->Toggle Vi Compatible"),
3862         N_("                              for Vim defaults   "),
3863     };
3864 #endif
3865
3866     // blanklines = screen height - # message lines
3867     blanklines = (int)Rows - (ARRAY_LENGTH(lines) - 1);
3868     if (!p_cp)
3869         blanklines += 4;  // add 4 for not showing "Vi compatible" message
3870
3871     // Don't overwrite a statusline.  Depends on 'cmdheight'.
3872     if (p_ls > 1)
3873         blanklines -= Rows - topframe->fr_height;
3874     if (blanklines < 0)
3875         blanklines = 0;
3876
3877     // Show the sponsor and register message one out of four times, the Uganda
3878     // message two out of four times.
3879     sponsor = (int)time(NULL);
3880     sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0);
3881
3882     // start displaying the message lines after half of the blank lines
3883     row = blanklines / 2;
3884     if ((row >= 2 && Columns >= 50) || colon)
3885     {
3886         for (i = 0; i < (int)ARRAY_LENGTH(lines); ++i)
3887         {
3888             p = lines[i];
3889 #ifdef FEAT_GUI
3890             if (p_im && gui.in_use && gui_lines[i] != NULL)
3891                 p = gui_lines[i];
3892 #endif
3893             if (p == NULL)
3894             {
3895                 if (!p_cp)
3896                     break;
3897                 continue;
3898             }
3899             if (sponsor != 0)
3900             {
3901                 if (strstr(p, "children") != NULL)
3902                     p = sponsor < 0
3903                         ? N_("Sponsor Vim development!")
3904                         : N_("Become a registered Vim user!");
3905                 else if (strstr(p, "iccf") != NULL)
3906                     p = sponsor < 0
3907                         ? N_("type  :help sponsor<Enter>    for information ")
3908                         : N_("type  :help register<Enter>   for information ");
3909                 else if (strstr(p, "Orphans") != NULL)
3910                     p = N_("menu  Help->Sponsor/Register  for information    ");
3911             }
3912             if (*p != NUL)
3913                 do_intro_line(row, (char_u *)_(p), i == 2, 0);
3914             ++row;
3915         }
3916     }
3917
3918     // Make the wait-return message appear just below the text.
3919     if (colon)
3920         msg_row = row;
3921 }
3922
3923     static void
3924 do_intro_line(
3925     int         row,
3926     char_u      *mesg,
3927     int         add_version,
3928     int         attr)
3929 {
3930     char_u      vers[20];
3931     int         col;
3932     char_u      *p;
3933     int         l;
3934     int         clen;
3935 #ifdef MODIFIED_BY
3936 # define MODBY_LEN 150
3937     char_u      modby[MODBY_LEN];
3938
3939     if (*mesg == ' ')
3940     {
3941         vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1);
3942         l = (int)STRLEN(modby);
3943         vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1);
3944         mesg = modby;
3945     }
3946 #endif
3947
3948     // Center the message horizontally.
3949     col = vim_strsize(mesg);
3950     if (add_version)
3951     {
3952         STRCPY(vers, mediumVersion);
3953         if (highest_patch())
3954         {
3955             // Check for 9.9x or 9.9xx, alpha/beta version
3956             if (isalpha((int)vers[3]))
3957             {
3958                 int len = (isalpha((int)vers[4])) ? 5 : 4;
3959                 sprintf((char *)vers + len, ".%d%s", highest_patch(),
3960                                                          mediumVersion + len);
3961             }
3962             else
3963                 sprintf((char *)vers + 3, ".%d", highest_patch());
3964         }
3965         col += (int)STRLEN(vers);
3966     }
3967     col = (Columns - col) / 2;
3968     if (col < 0)
3969         col = 0;
3970
3971     // Split up in parts to highlight <> items differently.
3972     for (p = mesg; *p != NUL; p += l)
3973     {
3974         clen = 0;
3975         for (l = 0; p[l] != NUL
3976                          && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l)
3977         {
3978             if (has_mbyte)
3979             {
3980                 clen += ptr2cells(p + l);
3981                 l += (*mb_ptr2len)(p + l) - 1;
3982             }
3983             else
3984                 clen += byte2cells(p[l]);
3985         }
3986         screen_puts_len(p, l, row, col, *p == '<' ? HL_ATTR(HLF_8) : attr);
3987         col += clen;
3988     }
3989
3990     // Add the version number to the version line.
3991     if (add_version)
3992         screen_puts(vers, row, col, 0);
3993 }
3994
3995 /*
3996  * ":intro": clear screen, display intro screen and wait for return.
3997  */
3998     void
3999 ex_intro(exarg_T *eap UNUSED)
4000 {
4001     screenclear();
4002     intro_message(TRUE);
4003     wait_return(TRUE);
4004 }