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