Mercurial > vim
annotate src/version.c @ 3076:51ce22ba89d1 v7.3.310
updated for version 7.3.310
Problem: Code not following Vim style.
Solution: Fix the style. (Elias Diem)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 14 Sep 2011 16:05:15 +0200 |
parents | 6eae1b42c668 |
children | 2cbde6bcc623 |
rev | line source |
---|---|
7 | 1 /* vi:set ts=8 sts=4 sw=4: |
2 * | |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
5 * Do ":help uganda" in Vim to read copying and usage conditions. | |
6 * Do ":help credits" in Vim to see a list of people who contributed. | |
7 * See README.txt for an overview of the Vim source code. | |
8 */ | |
9 | |
10 #include "vim.h" | |
11 | |
12 #ifdef AMIGA | |
13 # include <time.h> /* for time() */ | |
14 #endif | |
15 | |
16 /* | |
17 * Vim originated from Stevie version 3.6 (Fish disk 217) by GRWalter (Fred) | |
18 * It has been changed beyond recognition since then. | |
19 * | |
26 | 20 * Differences between version 6.x and 7.x can be found with ":help version7". |
7 | 21 * Differences between version 5.x and 6.x can be found with ":help version6". |
22 * Differences between version 4.x and 5.x can be found with ":help version5". | |
23 * Differences between version 3.0 and 4.x can be found with ":help version4". | |
24 * All the remarks about older versions have been removed, they are not very | |
25 * interesting. | |
26 */ | |
27 | |
28 #include "version.h" | |
29 | |
378 | 30 char *Version = VIM_VERSION_SHORT; |
31 static char *mediumVersion = VIM_VERSION_MEDIUM; | |
7 | 32 |
33 #if defined(HAVE_DATE_TIME) || defined(PROTO) | |
34 # if (defined(VMS) && defined(VAXC)) || defined(PROTO) | |
35 char longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__) | |
36 + sizeof(__TIME__) + 3]; | |
37 void | |
38 make_version() | |
39 { | |
40 /* | |
41 * Construct the long version string. Necessary because | |
42 * VAX C can't catenate strings in the preprocessor. | |
43 */ | |
44 strcpy(longVersion, VIM_VERSION_LONG_DATE); | |
45 strcat(longVersion, __DATE__); | |
46 strcat(longVersion, " "); | |
47 strcat(longVersion, __TIME__); | |
48 strcat(longVersion, ")"); | |
49 } | |
50 # else | |
51 char *longVersion = VIM_VERSION_LONG_DATE __DATE__ " " __TIME__ ")"; | |
52 # endif | |
53 #else | |
54 char *longVersion = VIM_VERSION_LONG; | |
55 #endif | |
56 | |
57 static void version_msg __ARGS((char *s)); | |
58 | |
59 static char *(features[]) = | |
60 { | |
61 #ifdef AMIGA /* only for Amiga systems */ | |
62 # ifdef FEAT_ARP | |
63 "+ARP", | |
64 # else | |
65 "-ARP", | |
66 # endif | |
67 #endif | |
68 #ifdef FEAT_ARABIC | |
69 "+arabic", | |
70 #else | |
71 "-arabic", | |
72 #endif | |
73 #ifdef FEAT_AUTOCMD | |
74 "+autocmd", | |
75 #else | |
76 "-autocmd", | |
77 #endif | |
78 #ifdef FEAT_BEVAL | |
79 "+balloon_eval", | |
80 #else | |
81 "-balloon_eval", | |
82 #endif | |
83 #ifdef FEAT_BROWSE | |
84 "+browse", | |
85 #else | |
86 "-browse", | |
87 #endif | |
88 #ifdef NO_BUILTIN_TCAPS | |
89 "-builtin_terms", | |
90 #endif | |
91 #ifdef SOME_BUILTIN_TCAPS | |
92 "+builtin_terms", | |
93 #endif | |
94 #ifdef ALL_BUILTIN_TCAPS | |
95 "++builtin_terms", | |
96 #endif | |
97 #ifdef FEAT_BYTEOFF | |
98 "+byte_offset", | |
99 #else | |
100 "-byte_offset", | |
101 #endif | |
102 #ifdef FEAT_CINDENT | |
103 "+cindent", | |
104 #else | |
105 "-cindent", | |
106 #endif | |
107 #ifdef FEAT_CLIENTSERVER | |
108 "+clientserver", | |
109 #else | |
110 "-clientserver", | |
111 #endif | |
112 #ifdef FEAT_CLIPBOARD | |
113 "+clipboard", | |
114 #else | |
115 "-clipboard", | |
116 #endif | |
117 #ifdef FEAT_CMDL_COMPL | |
118 "+cmdline_compl", | |
119 #else | |
120 "-cmdline_compl", | |
121 #endif | |
122 #ifdef FEAT_CMDHIST | |
123 "+cmdline_hist", | |
124 #else | |
125 "-cmdline_hist", | |
126 #endif | |
127 #ifdef FEAT_CMDL_INFO | |
128 "+cmdline_info", | |
129 #else | |
130 "-cmdline_info", | |
131 #endif | |
132 #ifdef FEAT_COMMENTS | |
133 "+comments", | |
134 #else | |
135 "-comments", | |
136 #endif | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
137 #ifdef FEAT_CONCEAL |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
138 "+conceal", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
139 #else |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
140 "-conceal", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
141 #endif |
7 | 142 #ifdef FEAT_CRYPT |
143 "+cryptv", | |
144 #else | |
145 "-cryptv", | |
146 #endif | |
147 #ifdef FEAT_CSCOPE | |
148 "+cscope", | |
149 #else | |
150 "-cscope", | |
151 #endif | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
152 #ifdef FEAT_CURSORBIND |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
153 "+cursorbind", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
154 #else |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
155 "-cursorbind", |
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
156 #endif |
647 | 157 #ifdef CURSOR_SHAPE |
158 "+cursorshape", | |
159 #else | |
160 "-cursorshape", | |
161 #endif | |
7 | 162 #if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG) |
163 "+dialog_con_gui", | |
164 #else | |
165 # if defined(FEAT_CON_DIALOG) | |
166 "+dialog_con", | |
167 # else | |
168 # if defined(FEAT_GUI_DIALOG) | |
169 "+dialog_gui", | |
170 # else | |
171 "-dialog", | |
172 # endif | |
173 # endif | |
174 #endif | |
175 #ifdef FEAT_DIFF | |
176 "+diff", | |
177 #else | |
178 "-diff", | |
179 #endif | |
180 #ifdef FEAT_DIGRAPHS | |
181 "+digraphs", | |
182 #else | |
183 "-digraphs", | |
184 #endif | |
185 #ifdef FEAT_DND | |
186 "+dnd", | |
187 #else | |
188 "-dnd", | |
189 #endif | |
190 #ifdef EBCDIC | |
191 "+ebcdic", | |
192 #else | |
193 "-ebcdic", | |
194 #endif | |
195 #ifdef FEAT_EMACS_TAGS | |
196 "+emacs_tags", | |
197 #else | |
198 "-emacs_tags", | |
199 #endif | |
200 #ifdef FEAT_EVAL | |
201 "+eval", | |
202 #else | |
203 "-eval", | |
204 #endif | |
205 #ifdef FEAT_EX_EXTRA | |
206 "+ex_extra", | |
207 #else | |
208 "-ex_extra", | |
209 #endif | |
210 #ifdef FEAT_SEARCH_EXTRA | |
211 "+extra_search", | |
212 #else | |
213 "-extra_search", | |
214 #endif | |
215 #ifdef FEAT_FKMAP | |
216 "+farsi", | |
217 #else | |
218 "-farsi", | |
219 #endif | |
220 #ifdef FEAT_SEARCHPATH | |
221 "+file_in_path", | |
222 #else | |
223 "-file_in_path", | |
224 #endif | |
225 #ifdef FEAT_FIND_ID | |
226 "+find_in_path", | |
227 #else | |
228 "-find_in_path", | |
229 #endif | |
1621 | 230 #ifdef FEAT_FLOAT |
231 "+float", | |
232 #else | |
233 "-float", | |
234 #endif | |
7 | 235 #ifdef FEAT_FOLDING |
236 "+folding", | |
237 #else | |
238 "-folding", | |
239 #endif | |
240 #ifdef FEAT_FOOTER | |
241 "+footer", | |
242 #else | |
243 "-footer", | |
244 #endif | |
245 /* only interesting on Unix systems */ | |
246 #if !defined(USE_SYSTEM) && defined(UNIX) | |
247 "+fork()", | |
248 #endif | |
249 #ifdef FEAT_GETTEXT | |
250 # ifdef DYNAMIC_GETTEXT | |
251 "+gettext/dyn", | |
252 # else | |
253 "+gettext", | |
254 # endif | |
255 #else | |
256 "-gettext", | |
257 #endif | |
258 #ifdef FEAT_HANGULIN | |
259 "+hangul_input", | |
260 #else | |
261 "-hangul_input", | |
262 #endif | |
263 #if (defined(HAVE_ICONV_H) && defined(USE_ICONV)) || defined(DYNAMIC_ICONV) | |
264 # ifdef DYNAMIC_ICONV | |
265 "+iconv/dyn", | |
266 # else | |
267 "+iconv", | |
268 # endif | |
269 #else | |
270 "-iconv", | |
271 #endif | |
272 #ifdef FEAT_INS_EXPAND | |
273 "+insert_expand", | |
274 #else | |
275 "-insert_expand", | |
276 #endif | |
277 #ifdef FEAT_JUMPLIST | |
278 "+jumplist", | |
279 #else | |
280 "-jumplist", | |
281 #endif | |
282 #ifdef FEAT_KEYMAP | |
283 "+keymap", | |
284 #else | |
285 "-keymap", | |
286 #endif | |
287 #ifdef FEAT_LANGMAP | |
288 "+langmap", | |
289 #else | |
290 "-langmap", | |
291 #endif | |
292 #ifdef FEAT_LIBCALL | |
293 "+libcall", | |
294 #else | |
295 "-libcall", | |
296 #endif | |
297 #ifdef FEAT_LINEBREAK | |
298 "+linebreak", | |
299 #else | |
300 "-linebreak", | |
301 #endif | |
302 #ifdef FEAT_LISP | |
303 "+lispindent", | |
304 #else | |
305 "-lispindent", | |
306 #endif | |
307 #ifdef FEAT_LISTCMDS | |
308 "+listcmds", | |
309 #else | |
310 "-listcmds", | |
311 #endif | |
312 #ifdef FEAT_LOCALMAP | |
313 "+localmap", | |
314 #else | |
315 "-localmap", | |
316 #endif | |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
317 #ifdef FEAT_LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
318 # ifdef DYNAMIC_LUA |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
319 "+lua/dyn", |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
320 # else |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
321 "+lua", |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
322 # endif |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
323 #else |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
324 "-lua", |
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2275
diff
changeset
|
325 #endif |
7 | 326 #ifdef FEAT_MENU |
327 "+menu", | |
328 #else | |
329 "-menu", | |
330 #endif | |
331 #ifdef FEAT_SESSION | |
332 "+mksession", | |
333 #else | |
334 "-mksession", | |
335 #endif | |
336 #ifdef FEAT_MODIFY_FNAME | |
337 "+modify_fname", | |
338 #else | |
339 "-modify_fname", | |
340 #endif | |
341 #ifdef FEAT_MOUSE | |
342 "+mouse", | |
343 # ifdef FEAT_MOUSESHAPE | |
344 "+mouseshape", | |
345 # else | |
346 "-mouseshape", | |
347 # endif | |
348 # else | |
349 "-mouse", | |
350 #endif | |
351 #if defined(UNIX) || defined(VMS) | |
352 # ifdef FEAT_MOUSE_DEC | |
353 "+mouse_dec", | |
354 # else | |
355 "-mouse_dec", | |
356 # endif | |
357 # ifdef FEAT_MOUSE_GPM | |
358 "+mouse_gpm", | |
359 # else | |
360 "-mouse_gpm", | |
361 # endif | |
362 # ifdef FEAT_MOUSE_JSB | |
363 "+mouse_jsbterm", | |
364 # else | |
365 "-mouse_jsbterm", | |
366 # endif | |
367 # ifdef FEAT_MOUSE_NET | |
368 "+mouse_netterm", | |
369 # else | |
370 "-mouse_netterm", | |
371 # endif | |
1621 | 372 # ifdef FEAT_SYSMOUSE |
373 "+mouse_sysmouse", | |
374 # else | |
375 "-mouse_sysmouse", | |
376 # endif | |
7 | 377 # ifdef FEAT_MOUSE_XTERM |
378 "+mouse_xterm", | |
379 # else | |
380 "-mouse_xterm", | |
381 # endif | |
382 #endif | |
383 #ifdef __QNX__ | |
384 # ifdef FEAT_MOUSE_PTERM | |
385 "+mouse_pterm", | |
386 # else | |
387 "-mouse_pterm", | |
388 # endif | |
389 #endif | |
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 # ifdef FEAT_MBYTE | |
398 "+multi_byte", | |
399 # else | |
400 "-multi_byte", | |
401 # endif | |
402 #endif | |
403 #ifdef FEAT_MULTI_LANG | |
404 "+multi_lang", | |
405 #else | |
406 "-multi_lang", | |
407 #endif | |
14 | 408 #ifdef FEAT_MZSCHEME |
132 | 409 # ifdef DYNAMIC_MZSCHEME |
410 "+mzscheme/dyn", | |
411 # else | |
14 | 412 "+mzscheme", |
132 | 413 # endif |
14 | 414 #else |
415 "-mzscheme", | |
416 #endif | |
7 | 417 #ifdef FEAT_NETBEANS_INTG |
418 "+netbeans_intg", | |
419 #else | |
420 "-netbeans_intg", | |
421 #endif | |
422 #ifdef FEAT_GUI_W32 | |
423 # ifdef FEAT_OLE | |
424 "+ole", | |
425 # else | |
426 "-ole", | |
427 # endif | |
428 #endif | |
429 #ifdef FEAT_PATH_EXTRA | |
430 "+path_extra", | |
431 #else | |
432 "-path_extra", | |
433 #endif | |
434 #ifdef FEAT_PERL | |
435 # ifdef DYNAMIC_PERL | |
436 "+perl/dyn", | |
437 # else | |
438 "+perl", | |
439 # endif | |
440 #else | |
441 "-perl", | |
442 #endif | |
2214
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
443 #ifdef FEAT_PERSISTENT_UNDO |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
444 "+persistent_undo", |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
445 #else |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
446 "-persistent_undo", |
f8222d1f9a73
Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
447 #endif |
7 | 448 #ifdef FEAT_PRINTER |
449 # ifdef FEAT_POSTSCRIPT | |
450 "+postscript", | |
451 # else | |
452 "-postscript", | |
453 # endif | |
454 "+printer", | |
455 #else | |
456 "-printer", | |
457 #endif | |
170 | 458 #ifdef FEAT_PROFILE |
459 "+profile", | |
460 #else | |
461 "-profile", | |
462 #endif | |
7 | 463 #ifdef FEAT_PYTHON |
464 # ifdef DYNAMIC_PYTHON | |
465 "+python/dyn", | |
466 # else | |
467 "+python", | |
468 # endif | |
469 #else | |
470 "-python", | |
471 #endif | |
2329
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
472 #ifdef FEAT_PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
473 # ifdef DYNAMIC_PYTHON3 |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
474 "+python3/dyn", |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
475 # else |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
476 "+python3", |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
477 # endif |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
478 #else |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
479 "-python3", |
ad2889f48843
Added support for Python 3. (Roland Puntaier)
Bram Moolenaar <bram@vim.org>
parents:
2320
diff
changeset
|
480 #endif |
7 | 481 #ifdef FEAT_QUICKFIX |
482 "+quickfix", | |
483 #else | |
484 "-quickfix", | |
485 #endif | |
857 | 486 #ifdef FEAT_RELTIME |
487 "+reltime", | |
488 #else | |
489 "-reltime", | |
490 #endif | |
7 | 491 #ifdef FEAT_RIGHTLEFT |
492 "+rightleft", | |
493 #else | |
494 "-rightleft", | |
495 #endif | |
496 #ifdef FEAT_RUBY | |
497 # ifdef DYNAMIC_RUBY | |
498 "+ruby/dyn", | |
499 # else | |
500 "+ruby", | |
501 # endif | |
502 #else | |
503 "-ruby", | |
504 #endif | |
505 #ifdef FEAT_SCROLLBIND | |
506 "+scrollbind", | |
507 #else | |
508 "-scrollbind", | |
509 #endif | |
510 #ifdef FEAT_SIGNS | |
511 "+signs", | |
512 #else | |
513 "-signs", | |
514 #endif | |
515 #ifdef FEAT_SMARTINDENT | |
516 "+smartindent", | |
517 #else | |
518 "-smartindent", | |
519 #endif | |
520 #ifdef FEAT_SNIFF | |
521 "+sniff", | |
522 #else | |
523 "-sniff", | |
524 #endif | |
1989 | 525 #ifdef STARTUPTIME |
526 "+startuptime", | |
527 #else | |
528 "-startuptime", | |
529 #endif | |
7 | 530 #ifdef FEAT_STL_OPT |
531 "+statusline", | |
532 #else | |
533 "-statusline", | |
534 #endif | |
535 #ifdef FEAT_SUN_WORKSHOP | |
536 "+sun_workshop", | |
537 #else | |
538 "-sun_workshop", | |
539 #endif | |
540 #ifdef FEAT_SYN_HL | |
541 "+syntax", | |
542 #else | |
543 "-syntax", | |
544 #endif | |
545 /* only interesting on Unix systems */ | |
546 #if defined(USE_SYSTEM) && (defined(UNIX) || defined(__EMX__)) | |
547 "+system()", | |
548 #endif | |
549 #ifdef FEAT_TAG_BINS | |
550 "+tag_binary", | |
551 #else | |
552 "-tag_binary", | |
553 #endif | |
554 #ifdef FEAT_TAG_OLDSTATIC | |
555 "+tag_old_static", | |
556 #else | |
557 "-tag_old_static", | |
558 #endif | |
559 #ifdef FEAT_TAG_ANYWHITE | |
560 "+tag_any_white", | |
561 #else | |
562 "-tag_any_white", | |
563 #endif | |
564 #ifdef FEAT_TCL | |
565 # ifdef DYNAMIC_TCL | |
566 "+tcl/dyn", | |
567 # else | |
568 "+tcl", | |
569 # endif | |
570 #else | |
571 "-tcl", | |
572 #endif | |
573 #if defined(UNIX) || defined(__EMX__) | |
574 /* only Unix (or OS/2 with EMX!) can have terminfo instead of termcap */ | |
575 # ifdef TERMINFO | |
576 "+terminfo", | |
577 # else | |
578 "-terminfo", | |
579 # endif | |
580 #else /* unix always includes termcap support */ | |
581 # ifdef HAVE_TGETENT | |
582 "+tgetent", | |
583 # else | |
584 "-tgetent", | |
585 # endif | |
586 #endif | |
587 #ifdef FEAT_TERMRESPONSE | |
588 "+termresponse", | |
589 #else | |
590 "-termresponse", | |
591 #endif | |
592 #ifdef FEAT_TEXTOBJ | |
593 "+textobjects", | |
594 #else | |
595 "-textobjects", | |
596 #endif | |
597 #ifdef FEAT_TITLE | |
598 "+title", | |
599 #else | |
600 "-title", | |
601 #endif | |
602 #ifdef FEAT_TOOLBAR | |
603 "+toolbar", | |
604 #else | |
605 "-toolbar", | |
606 #endif | |
607 #ifdef FEAT_USR_CMDS | |
608 "+user_commands", | |
609 #else | |
610 "-user_commands", | |
611 #endif | |
612 #ifdef FEAT_VERTSPLIT | |
613 "+vertsplit", | |
614 #else | |
615 "-vertsplit", | |
616 #endif | |
617 #ifdef FEAT_VIRTUALEDIT | |
618 "+virtualedit", | |
619 #else | |
620 "-virtualedit", | |
621 #endif | |
622 #ifdef FEAT_VISUAL | |
623 "+visual", | |
624 # ifdef FEAT_VISUALEXTRA | |
625 "+visualextra", | |
626 # else | |
627 "-visualextra", | |
628 # endif | |
629 #else | |
630 "-visual", | |
631 #endif | |
632 #ifdef FEAT_VIMINFO | |
633 "+viminfo", | |
634 #else | |
635 "-viminfo", | |
636 #endif | |
637 #ifdef FEAT_VREPLACE | |
638 "+vreplace", | |
639 #else | |
640 "-vreplace", | |
641 #endif | |
642 #ifdef FEAT_WILDIGN | |
643 "+wildignore", | |
644 #else | |
645 "-wildignore", | |
646 #endif | |
647 #ifdef FEAT_WILDMENU | |
648 "+wildmenu", | |
649 #else | |
650 "-wildmenu", | |
651 #endif | |
652 #ifdef FEAT_WINDOWS | |
653 "+windows", | |
654 #else | |
655 "-windows", | |
656 #endif | |
657 #ifdef FEAT_WRITEBACKUP | |
658 "+writebackup", | |
659 #else | |
660 "-writebackup", | |
661 #endif | |
662 #if defined(UNIX) || defined(VMS) | |
663 # ifdef FEAT_X11 | |
664 "+X11", | |
665 # else | |
666 "-X11", | |
667 # endif | |
668 #endif | |
669 #ifdef FEAT_XFONTSET | |
670 "+xfontset", | |
671 #else | |
672 "-xfontset", | |
673 #endif | |
674 #ifdef FEAT_XIM | |
675 "+xim", | |
676 #else | |
677 "-xim", | |
678 #endif | |
679 #if defined(UNIX) || defined(VMS) | |
680 # ifdef USE_XSMP_INTERACT | |
681 "+xsmp_interact", | |
682 # else | |
683 # ifdef USE_XSMP | |
684 "+xsmp", | |
685 # else | |
686 "-xsmp", | |
687 # endif | |
688 # endif | |
689 # ifdef FEAT_XCLIPBOARD | |
690 "+xterm_clipboard", | |
691 # else | |
692 "-xterm_clipboard", | |
693 # endif | |
694 #endif | |
695 #ifdef FEAT_XTERM_SAVE | |
696 "+xterm_save", | |
697 #else | |
698 "-xterm_save", | |
699 #endif | |
700 #ifdef WIN3264 | |
701 # ifdef FEAT_XPM_W32 | |
702 "+xpm_w32", | |
703 # else | |
704 "-xpm_w32", | |
705 # endif | |
706 #endif | |
707 NULL | |
708 }; | |
709 | |
710 static int included_patches[] = | |
711 { /* Add new patch number below this line */ | |
712 /**/ | |
3076 | 713 310, |
714 /**/ | |
3074 | 715 309, |
716 /**/ | |
3072 | 717 308, |
718 /**/ | |
3070 | 719 307, |
720 /**/ | |
3068 | 721 306, |
722 /**/ | |
3066 | 723 305, |
724 /**/ | |
3064 | 725 304, |
726 /**/ | |
3062 | 727 303, |
728 /**/ | |
3060 | 729 302, |
730 /**/ | |
3058 | 731 301, |
732 /**/ | |
3056 | 733 300, |
734 /**/ | |
3054 | 735 299, |
736 /**/ | |
3052 | 737 298, |
738 /**/ | |
3050 | 739 297, |
740 /**/ | |
3048 | 741 296, |
742 /**/ | |
3046 | 743 295, |
744 /**/ | |
3044 | 745 294, |
746 /**/ | |
3042 | 747 293, |
748 /**/ | |
3040 | 749 292, |
750 /**/ | |
3038 | 751 291, |
752 /**/ | |
3036 | 753 290, |
754 /**/ | |
3034 | 755 289, |
756 /**/ | |
3032 | 757 288, |
758 /**/ | |
3030 | 759 287, |
760 /**/ | |
3028 | 761 286, |
762 /**/ | |
3026 | 763 285, |
764 /**/ | |
3024 | 765 284, |
766 /**/ | |
3022 | 767 283, |
768 /**/ | |
3020 | 769 282, |
770 /**/ | |
3018 | 771 281, |
772 /**/ | |
3016 | 773 280, |
774 /**/ | |
3014 | 775 279, |
776 /**/ | |
3012 | 777 278, |
778 /**/ | |
3010 | 779 277, |
780 /**/ | |
3008 | 781 276, |
782 /**/ | |
3006 | 783 275, |
784 /**/ | |
3004 | 785 274, |
786 /**/ | |
3002 | 787 273, |
788 /**/ | |
3000 | 789 272, |
790 /**/ | |
2998 | 791 271, |
792 /**/ | |
2996 | 793 270, |
794 /**/ | |
2994 | 795 269, |
796 /**/ | |
2992 | 797 268, |
798 /**/ | |
2990 | 799 267, |
800 /**/ | |
2988 | 801 266, |
802 /**/ | |
2986 | 803 265, |
804 /**/ | |
2984 | 805 264, |
806 /**/ | |
2982 | 807 263, |
808 /**/ | |
2980 | 809 262, |
810 /**/ | |
2978 | 811 261, |
812 /**/ | |
2976 | 813 260, |
814 /**/ | |
2974 | 815 259, |
816 /**/ | |
2972 | 817 258, |
818 /**/ | |
2970 | 819 257, |
820 /**/ | |
2968 | 821 256, |
822 /**/ | |
2966 | 823 255, |
824 /**/ | |
2963 | 825 254, |
826 /**/ | |
2961 | 827 253, |
828 /**/ | |
2959 | 829 252, |
830 /**/ | |
2957 | 831 251, |
832 /**/ | |
2955 | 833 250, |
834 /**/ | |
2953 | 835 249, |
836 /**/ | |
2951 | 837 248, |
838 /**/ | |
2949 | 839 247, |
840 /**/ | |
2947 | 841 246, |
842 /**/ | |
2945 | 843 245, |
844 /**/ | |
2943 | 845 244, |
846 /**/ | |
2941 | 847 243, |
848 /**/ | |
2939 | 849 242, |
850 /**/ | |
2937 | 851 241, |
852 /**/ | |
2935 | 853 240, |
854 /**/ | |
2933 | 855 239, |
856 /**/ | |
2931 | 857 238, |
858 /**/ | |
2929 | 859 237, |
860 /**/ | |
2927 | 861 236, |
862 /**/ | |
2925 | 863 235, |
864 /**/ | |
2923 | 865 234, |
866 /**/ | |
2921 | 867 233, |
868 /**/ | |
2919 | 869 232, |
870 /**/ | |
2917 | 871 231, |
872 /**/ | |
2915 | 873 230, |
874 /**/ | |
2913 | 875 229, |
876 /**/ | |
2911 | 877 228, |
878 /**/ | |
2909 | 879 227, |
880 /**/ | |
2906 | 881 226, |
882 /**/ | |
2904 | 883 225, |
884 /**/ | |
2902 | 885 224, |
886 /**/ | |
2900 | 887 223, |
888 /**/ | |
2898 | 889 222, |
890 /**/ | |
2896 | 891 221, |
892 /**/ | |
2894 | 893 220, |
894 /**/ | |
2891 | 895 219, |
896 /**/ | |
2889 | 897 218, |
898 /**/ | |
2887 | 899 217, |
900 /**/ | |
2885 | 901 216, |
902 /**/ | |
2883 | 903 215, |
904 /**/ | |
2881 | 905 214, |
906 /**/ | |
2879 | 907 213, |
908 /**/ | |
2877 | 909 212, |
910 /**/ | |
2875 | 911 211, |
912 /**/ | |
2873 | 913 210, |
914 /**/ | |
2871 | 915 209, |
916 /**/ | |
2869 | 917 208, |
918 /**/ | |
2867 | 919 207, |
920 /**/ | |
2865 | 921 206, |
922 /**/ | |
2863 | 923 205, |
924 /**/ | |
2861 | 925 204, |
926 /**/ | |
2859 | 927 203, |
928 /**/ | |
2857 | 929 202, |
930 /**/ | |
2855 | 931 201, |
932 /**/ | |
2853 | 933 200, |
934 /**/ | |
2851 | 935 199, |
936 /**/ | |
2849 | 937 198, |
938 /**/ | |
2847 | 939 197, |
940 /**/ | |
2845 | 941 196, |
942 /**/ | |
2843 | 943 195, |
944 /**/ | |
2841 | 945 194, |
946 /**/ | |
2839 | 947 193, |
948 /**/ | |
2837 | 949 192, |
950 /**/ | |
2834 | 951 191, |
952 /**/ | |
2831 | 953 190, |
954 /**/ | |
2829 | 955 189, |
956 /**/ | |
2827 | 957 188, |
958 /**/ | |
2823 | 959 187, |
960 /**/ | |
2821 | 961 186, |
962 /**/ | |
2819 | 963 185, |
964 /**/ | |
2817 | 965 184, |
966 /**/ | |
2815 | 967 183, |
968 /**/ | |
2813 | 969 182, |
970 /**/ | |
2811 | 971 181, |
972 /**/ | |
2809 | 973 180, |
974 /**/ | |
2807 | 975 179, |
976 /**/ | |
2805 | 977 178, |
978 /**/ | |
2803 | 979 177, |
980 /**/ | |
2801 | 981 176, |
982 /**/ | |
2799 | 983 175, |
984 /**/ | |
2797 | 985 174, |
986 /**/ | |
2795 | 987 173, |
988 /**/ | |
2793 | 989 172, |
990 /**/ | |
2791 | 991 171, |
992 /**/ | |
2789 | 993 170, |
994 /**/ | |
2786 | 995 169, |
996 /**/ | |
2784 | 997 168, |
998 /**/ | |
2782 | 999 167, |
1000 /**/ | |
2780 | 1001 166, |
1002 /**/ | |
2778 | 1003 165, |
1004 /**/ | |
2776 | 1005 164, |
1006 /**/ | |
2774 | 1007 163, |
1008 /**/ | |
2772 | 1009 162, |
1010 /**/ | |
2770 | 1011 161, |
1012 /**/ | |
2768 | 1013 160, |
1014 /**/ | |
2766 | 1015 159, |
1016 /**/ | |
2764 | 1017 158, |
1018 /**/ | |
2762 | 1019 157, |
1020 /**/ | |
2760 | 1021 156, |
1022 /**/ | |
2758 | 1023 155, |
1024 /**/ | |
2756 | 1025 154, |
1026 /**/ | |
2754 | 1027 153, |
1028 /**/ | |
2752 | 1029 152, |
1030 /**/ | |
2749 | 1031 151, |
1032 /**/ | |
2747 | 1033 150, |
1034 /**/ | |
2745 | 1035 149, |
1036 /**/ | |
2743 | 1037 148, |
1038 /**/ | |
2741 | 1039 147, |
1040 /**/ | |
2739 | 1041 146, |
1042 /**/ | |
2737 | 1043 145, |
1044 /**/ | |
2735 | 1045 144, |
1046 /**/ | |
2730 | 1047 143, |
1048 /**/ | |
2727 | 1049 142, |
1050 /**/ | |
2726 | 1051 141, |
1052 /**/ | |
2724 | 1053 140, |
1054 /**/ | |
2723 | 1055 139, |
1056 /**/ | |
2722 | 1057 138, |
1058 /**/ | |
2721 | 1059 137, |
1060 /**/ | |
2720 | 1061 136, |
1062 /**/ | |
2719 | 1063 135, |
1064 /**/ | |
2718 | 1065 134, |
1066 /**/ | |
2717 | 1067 133, |
1068 /**/ | |
2716 | 1069 132, |
1070 /**/ | |
2715 | 1071 131, |
1072 /**/ | |
2714 | 1073 130, |
1074 /**/ | |
2713 | 1075 129, |
1076 /**/ | |
2712 | 1077 128, |
1078 /**/ | |
2711 | 1079 127, |
1080 /**/ | |
2710 | 1081 126, |
1082 /**/ | |
2708 | 1083 125, |
1084 /**/ | |
2707 | 1085 124, |
1086 /**/ | |
2706 | 1087 123, |
1088 /**/ | |
2705 | 1089 122, |
1090 /**/ | |
2704 | 1091 121, |
1092 /**/ | |
2703 | 1093 120, |
1094 /**/ | |
2702 | 1095 119, |
1096 /**/ | |
2701 | 1097 118, |
1098 /**/ | |
2700 | 1099 117, |
1100 /**/ | |
2699 | 1101 116, |
1102 /**/ | |
2697 | 1103 115, |
1104 /**/ | |
2696 | 1105 114, |
1106 /**/ | |
2695 | 1107 113, |
1108 /**/ | |
2694 | 1109 112, |
1110 /**/ | |
2693 | 1111 111, |
1112 /**/ | |
2692 | 1113 110, |
1114 /**/ | |
2691 | 1115 109, |
1116 /**/ | |
2690 | 1117 108, |
1118 /**/ | |
2689 | 1119 107, |
1120 /**/ | |
2688 | 1121 106, |
1122 /**/ | |
2687 | 1123 105, |
1124 /**/ | |
2686 | 1125 104, |
1126 /**/ | |
2685 | 1127 103, |
1128 /**/ | |
2684 | 1129 102, |
1130 /**/ | |
2683 | 1131 101, |
1132 /**/ | |
2682 | 1133 100, |
1134 /**/ | |
2680 | 1135 99, |
1136 /**/ | |
2679 | 1137 98, |
1138 /**/ | |
2678 | 1139 97, |
1140 /**/ | |
2677 | 1141 96, |
1142 /**/ | |
2676 | 1143 95, |
1144 /**/ | |
2675 | 1145 94, |
1146 /**/ | |
2674 | 1147 93, |
1148 /**/ | |
2673 | 1149 92, |
1150 /**/ | |
2672 | 1151 91, |
1152 /**/ | |
2671 | 1153 90, |
1154 /**/ | |
2670 | 1155 89, |
1156 /**/ | |
2669 | 1157 88, |
1158 /**/ | |
2668 | 1159 87, |
1160 /**/ | |
2667 | 1161 86, |
1162 /**/ | |
2666 | 1163 85, |
1164 /**/ | |
2665 | 1165 84, |
1166 /**/ | |
2664 | 1167 83, |
1168 /**/ | |
2663 | 1169 82, |
1170 /**/ | |
2661 | 1171 81, |
1172 /**/ | |
2660 | 1173 80, |
1174 /**/ | |
2659 | 1175 79, |
1176 /**/ | |
2658 | 1177 78, |
1178 /**/ | |
2657 | 1179 77, |
1180 /**/ | |
2656 | 1181 76, |
1182 /**/ | |
2655 | 1183 75, |
1184 /**/ | |
2654 | 1185 74, |
1186 /**/ | |
2653 | 1187 73, |
1188 /**/ | |
2652 | 1189 72, |
1190 /**/ | |
2651 | 1191 71, |
1192 /**/ | |
2650 | 1193 70, |
1194 /**/ | |
2649 | 1195 69, |
1196 /**/ | |
2648 | 1197 68, |
1198 /**/ | |
2647 | 1199 67, |
1200 /**/ | |
2646 | 1201 66, |
1202 /**/ | |
2645 | 1203 65, |
1204 /**/ | |
2644 | 1205 64, |
1206 /**/ | |
2643 | 1207 63, |
1208 /**/ | |
2641 | 1209 62, |
1210 /**/ | |
2640 | 1211 61, |
1212 /**/ | |
2639 | 1213 60, |
1214 /**/ | |
2638 | 1215 59, |
1216 /**/ | |
2637 | 1217 58, |
1218 /**/ | |
2636 | 1219 57, |
1220 /**/ | |
2635 | 1221 56, |
1222 /**/ | |
2634 | 1223 55, |
1224 /**/ | |
2633 | 1225 54, |
1226 /**/ | |
2632 | 1227 53, |
1228 /**/ | |
2631 | 1229 52, |
1230 /**/ | |
2630 | 1231 51, |
1232 /**/ | |
2629 | 1233 50, |
1234 /**/ | |
2628 | 1235 49, |
1236 /**/ | |
2627 | 1237 48, |
1238 /**/ | |
2626 | 1239 47, |
1240 /**/ | |
2624 | 1241 46, |
1242 /**/ | |
2623 | 1243 45, |
1244 /**/ | |
2622 | 1245 44, |
1246 /**/ | |
2621 | 1247 43, |
1248 /**/ | |
2620 | 1249 42, |
1250 /**/ | |
2619 | 1251 41, |
1252 /**/ | |
2618 | 1253 40, |
1254 /**/ | |
2617 | 1255 39, |
1256 /**/ | |
2616 | 1257 38, |
1258 /**/ | |
2615 | 1259 37, |
1260 /**/ | |
2614 | 1261 36, |
1262 /**/ | |
2613 | 1263 35, |
1264 /**/ | |
2612 | 1265 34, |
1266 /**/ | |
2611 | 1267 33, |
1268 /**/ | |
2610 | 1269 32, |
1270 /**/ | |
2609 | 1271 31, |
1272 /**/ | |
2607 | 1273 30, |
1274 /**/ | |
2606 | 1275 29, |
1276 /**/ | |
2605 | 1277 28, |
1278 /**/ | |
2604 | 1279 27, |
1280 /**/ | |
2603 | 1281 26, |
1282 /**/ | |
2602 | 1283 25, |
1284 /**/ | |
2601 | 1285 24, |
1286 /**/ | |
2600 | 1287 23, |
1288 /**/ | |
2599 | 1289 22, |
1290 /**/ | |
2598 | 1291 21, |
1292 /**/ | |
2597 | 1293 20, |
1294 /**/ | |
2595 | 1295 19, |
1296 /**/ | |
2594 | 1297 18, |
1298 /**/ | |
2593 | 1299 17, |
1300 /**/ | |
2592 | 1301 16, |
1302 /**/ | |
2591 | 1303 15, |
1304 /**/ | |
2590 | 1305 14, |
1306 /**/ | |
2589 | 1307 13, |
1308 /**/ | |
2588 | 1309 12, |
1310 /**/ | |
2586 | 1311 11, |
1312 /**/ | |
2585 | 1313 10, |
1314 /**/ | |
2584 | 1315 9, |
1316 /**/ | |
2583 | 1317 8, |
1318 /**/ | |
2582 | 1319 7, |
1320 /**/ | |
2580 | 1321 6, |
1322 /**/ | |
2579 | 1323 5, |
1324 /**/ | |
2578 | 1325 4, |
1326 /**/ | |
2165
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1327 3, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1328 /**/ |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1329 2, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1330 /**/ |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1331 1, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1332 /**/ |
7 | 1333 0 |
1334 }; | |
1335 | |
1760 | 1336 /* |
1337 * Place to put a short description when adding a feature with a patch. | |
1338 * Keep it short, e.g.,: "relative numbers", "persistent undo". | |
1339 * Also add a comment marker to separate the lines. | |
1340 * See the official Vim patches for the diff format: It must use a context of | |
1777 | 1341 * one line only. Create it by hand or use "diff -C2" and edit the patch. |
1760 | 1342 */ |
1343 static char *(extra_patches[]) = | |
1344 { /* Add your patch description below this line */ | |
1345 /**/ | |
1346 NULL | |
1347 }; | |
1348 | |
7 | 1349 int |
1350 highest_patch() | |
1351 { | |
1352 int i; | |
1353 int h = 0; | |
1354 | |
1355 for (i = 0; included_patches[i] != 0; ++i) | |
1356 if (included_patches[i] > h) | |
1357 h = included_patches[i]; | |
1358 return h; | |
1359 } | |
1360 | |
1361 #if defined(FEAT_EVAL) || defined(PROTO) | |
1362 /* | |
1363 * Return TRUE if patch "n" has been included. | |
1364 */ | |
1365 int | |
1366 has_patch(n) | |
1367 int n; | |
1368 { | |
1369 int i; | |
1370 | |
1371 for (i = 0; included_patches[i] != 0; ++i) | |
1372 if (included_patches[i] == n) | |
1373 return TRUE; | |
1374 return FALSE; | |
1375 } | |
1376 #endif | |
1377 | |
1378 void | |
1379 ex_version(eap) | |
1380 exarg_T *eap; | |
1381 { | |
1382 /* | |
1383 * Ignore a ":version 9.99" command. | |
1384 */ | |
1385 if (*eap->arg == NUL) | |
1386 { | |
1387 msg_putchar('\n'); | |
1388 list_version(); | |
1389 } | |
1390 } | |
1391 | |
1392 void | |
1393 list_version() | |
1394 { | |
1395 int i; | |
1396 int first; | |
1397 char *s = ""; | |
1398 | |
1399 /* | |
1400 * When adding features here, don't forget to update the list of | |
1401 * internal variables in eval.c! | |
1402 */ | |
1403 MSG(longVersion); | |
1404 #ifdef WIN3264 | |
1405 # ifdef FEAT_GUI_W32 | |
1406 # if defined(_MSC_VER) && (_MSC_VER <= 1010) | |
1407 /* Only MS VC 4.1 and earlier can do Win32s */ | |
1607 | 1408 MSG_PUTS(_("\nMS-Windows 16/32-bit GUI version")); |
7 | 1409 # else |
990 | 1410 # ifdef _WIN64 |
1607 | 1411 MSG_PUTS(_("\nMS-Windows 64-bit GUI version")); |
990 | 1412 # else |
1607 | 1413 MSG_PUTS(_("\nMS-Windows 32-bit GUI version")); |
990 | 1414 # endif |
7 | 1415 # endif |
1416 if (gui_is_win32s()) | |
1417 MSG_PUTS(_(" in Win32s mode")); | |
1418 # ifdef FEAT_OLE | |
1419 MSG_PUTS(_(" with OLE support")); | |
1420 # endif | |
1421 # else | |
1607 | 1422 # ifdef _WIN64 |
1423 MSG_PUTS(_("\nMS-Windows 64-bit console version")); | |
1424 # else | |
1425 MSG_PUTS(_("\nMS-Windows 32-bit console version")); | |
1426 # endif | |
7 | 1427 # endif |
1428 #endif | |
1429 #ifdef WIN16 | |
1607 | 1430 MSG_PUTS(_("\nMS-Windows 16-bit version")); |
7 | 1431 #endif |
1432 #ifdef MSDOS | |
1433 # ifdef DJGPP | |
1607 | 1434 MSG_PUTS(_("\n32-bit MS-DOS version")); |
7 | 1435 # else |
1607 | 1436 MSG_PUTS(_("\n16-bit MS-DOS version")); |
7 | 1437 # endif |
1438 #endif | |
1439 #ifdef MACOS | |
1440 # ifdef MACOS_X | |
1441 # ifdef MACOS_X_UNIX | |
1442 MSG_PUTS(_("\nMacOS X (unix) version")); | |
1443 # else | |
1444 MSG_PUTS(_("\nMacOS X version")); | |
1445 # endif | |
1446 #else | |
1447 MSG_PUTS(_("\nMacOS version")); | |
1448 # endif | |
1449 #endif | |
1450 | |
1451 #ifdef VMS | |
1705 | 1452 MSG_PUTS(_("\nOpenVMS version")); |
1045 | 1453 # ifdef HAVE_PATHDEF |
1454 if (*compiled_arch != NUL) | |
1455 { | |
1456 MSG_PUTS(" - "); | |
1457 MSG_PUTS(compiled_arch); | |
1458 } | |
1459 # endif | |
1460 | |
7 | 1461 #endif |
1462 | |
1463 /* Print the list of patch numbers if there is at least one. */ | |
1464 /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */ | |
1465 if (included_patches[0] != 0) | |
1466 { | |
1467 MSG_PUTS(_("\nIncluded patches: ")); | |
1468 first = -1; | |
1469 /* find last one */ | |
1470 for (i = 0; included_patches[i] != 0; ++i) | |
1471 ; | |
1472 while (--i >= 0) | |
1473 { | |
1474 if (first < 0) | |
1475 first = included_patches[i]; | |
1476 if (i == 0 || included_patches[i - 1] != included_patches[i] + 1) | |
1477 { | |
1478 MSG_PUTS(s); | |
1479 s = ", "; | |
1480 msg_outnum((long)first); | |
1481 if (first != included_patches[i]) | |
1482 { | |
1483 MSG_PUTS("-"); | |
1484 msg_outnum((long)included_patches[i]); | |
1485 } | |
1486 first = -1; | |
1487 } | |
1488 } | |
1489 } | |
1490 | |
1760 | 1491 /* Print the list of extra patch descriptions if there is at least one. */ |
1492 if (extra_patches[0] != NULL) | |
1493 { | |
1494 MSG_PUTS(_("\nExtra patches: ")); | |
1495 s = ""; | |
1496 for (i = 0; extra_patches[i] != NULL; ++i) | |
1497 { | |
1498 MSG_PUTS(s); | |
1499 s = ", "; | |
1500 MSG_PUTS(extra_patches[i]); | |
1501 } | |
1502 } | |
1503 | |
7 | 1504 #ifdef MODIFIED_BY |
1505 MSG_PUTS("\n"); | |
1506 MSG_PUTS(_("Modified by ")); | |
1507 MSG_PUTS(MODIFIED_BY); | |
1508 #endif | |
1509 | |
1510 #ifdef HAVE_PATHDEF | |
1511 if (*compiled_user != NUL || *compiled_sys != NUL) | |
1512 { | |
1513 MSG_PUTS(_("\nCompiled ")); | |
1514 if (*compiled_user != NUL) | |
1515 { | |
1516 MSG_PUTS(_("by ")); | |
1517 MSG_PUTS(compiled_user); | |
1518 } | |
1519 if (*compiled_sys != NUL) | |
1520 { | |
1521 MSG_PUTS("@"); | |
1522 MSG_PUTS(compiled_sys); | |
1523 } | |
1524 } | |
1525 #endif | |
1526 | |
1527 #ifdef FEAT_HUGE | |
1528 MSG_PUTS(_("\nHuge version ")); | |
1529 #else | |
1530 # ifdef FEAT_BIG | |
1531 MSG_PUTS(_("\nBig version ")); | |
1532 # else | |
1533 # ifdef FEAT_NORMAL | |
1534 MSG_PUTS(_("\nNormal version ")); | |
1535 # else | |
1536 # ifdef FEAT_SMALL | |
1537 MSG_PUTS(_("\nSmall version ")); | |
1538 # else | |
1539 MSG_PUTS(_("\nTiny version ")); | |
1540 # endif | |
1541 # endif | |
1542 # endif | |
1543 #endif | |
1544 #ifndef FEAT_GUI | |
1545 MSG_PUTS(_("without GUI.")); | |
1546 #else | |
1547 # ifdef FEAT_GUI_GTK | |
1548 # ifdef FEAT_GUI_GNOME | |
1549 MSG_PUTS(_("with GTK2-GNOME GUI.")); | |
1550 # else | |
1551 MSG_PUTS(_("with GTK2 GUI.")); | |
1552 # endif | |
1553 # else | |
1554 # ifdef FEAT_GUI_MOTIF | |
1555 MSG_PUTS(_("with X11-Motif GUI.")); | |
1556 # else | |
1557 # ifdef FEAT_GUI_ATHENA | |
1558 # ifdef FEAT_GUI_NEXTAW | |
1559 MSG_PUTS(_("with X11-neXtaw GUI.")); | |
1560 # else | |
1561 MSG_PUTS(_("with X11-Athena GUI.")); | |
1562 # endif | |
1563 # else | |
1564 # ifdef FEAT_GUI_PHOTON | |
1565 MSG_PUTS(_("with Photon GUI.")); | |
1566 # else | |
1567 # if defined(MSWIN) | |
1568 MSG_PUTS(_("with GUI.")); | |
1569 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1570 # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON |
7 | 1571 MSG_PUTS(_("with Carbon GUI.")); |
1572 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1573 # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX |
7 | 1574 MSG_PUTS(_("with Cocoa GUI.")); |
1575 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1576 # if defined(MACOS) |
7 | 1577 MSG_PUTS(_("with (classic) GUI.")); |
1578 # endif | |
1579 # endif | |
1580 # endif | |
1581 # endif | |
1582 # endif | |
1583 # endif | |
1584 # endif | |
1585 # endif | |
1586 #endif | |
1587 version_msg(_(" Features included (+) or not (-):\n")); | |
1588 | |
1589 /* print all the features */ | |
1590 for (i = 0; features[i] != NULL; ++i) | |
1591 { | |
1592 version_msg(features[i]); | |
1593 if (msg_col > 0) | |
1594 version_msg(" "); | |
1595 } | |
1596 | |
1597 version_msg("\n"); | |
1598 #ifdef SYS_VIMRC_FILE | |
1599 version_msg(_(" system vimrc file: \"")); | |
1600 version_msg(SYS_VIMRC_FILE); | |
1601 version_msg("\"\n"); | |
1602 #endif | |
1603 #ifdef USR_VIMRC_FILE | |
1604 version_msg(_(" user vimrc file: \"")); | |
1605 version_msg(USR_VIMRC_FILE); | |
1606 version_msg("\"\n"); | |
1607 #endif | |
1608 #ifdef USR_VIMRC_FILE2 | |
1609 version_msg(_(" 2nd user vimrc file: \"")); | |
1610 version_msg(USR_VIMRC_FILE2); | |
1611 version_msg("\"\n"); | |
1612 #endif | |
1613 #ifdef USR_VIMRC_FILE3 | |
1614 version_msg(_(" 3rd user vimrc file: \"")); | |
1615 version_msg(USR_VIMRC_FILE3); | |
1616 version_msg("\"\n"); | |
1617 #endif | |
1618 #ifdef USR_EXRC_FILE | |
1619 version_msg(_(" user exrc file: \"")); | |
1620 version_msg(USR_EXRC_FILE); | |
1621 version_msg("\"\n"); | |
1622 #endif | |
1623 #ifdef USR_EXRC_FILE2 | |
1624 version_msg(_(" 2nd user exrc file: \"")); | |
1625 version_msg(USR_EXRC_FILE2); | |
1626 version_msg("\"\n"); | |
1627 #endif | |
1628 #ifdef FEAT_GUI | |
1629 # ifdef SYS_GVIMRC_FILE | |
1630 version_msg(_(" system gvimrc file: \"")); | |
1631 version_msg(SYS_GVIMRC_FILE); | |
1632 version_msg("\"\n"); | |
1633 # endif | |
1634 version_msg(_(" user gvimrc file: \"")); | |
1635 version_msg(USR_GVIMRC_FILE); | |
1636 version_msg("\"\n"); | |
1637 # ifdef USR_GVIMRC_FILE2 | |
1638 version_msg(_("2nd user gvimrc file: \"")); | |
1639 version_msg(USR_GVIMRC_FILE2); | |
1640 version_msg("\"\n"); | |
1641 # endif | |
1642 # ifdef USR_GVIMRC_FILE3 | |
1643 version_msg(_("3rd user gvimrc file: \"")); | |
1644 version_msg(USR_GVIMRC_FILE3); | |
1645 version_msg("\"\n"); | |
1646 # endif | |
1647 #endif | |
1648 #ifdef FEAT_GUI | |
1649 # ifdef SYS_MENU_FILE | |
1650 version_msg(_(" system menu file: \"")); | |
1651 version_msg(SYS_MENU_FILE); | |
1652 version_msg("\"\n"); | |
1653 # endif | |
1654 #endif | |
1655 #ifdef HAVE_PATHDEF | |
1656 if (*default_vim_dir != NUL) | |
1657 { | |
1658 version_msg(_(" fall-back for $VIM: \"")); | |
1659 version_msg((char *)default_vim_dir); | |
1660 version_msg("\"\n"); | |
1661 } | |
1662 if (*default_vimruntime_dir != NUL) | |
1663 { | |
1664 version_msg(_(" f-b for $VIMRUNTIME: \"")); | |
1665 version_msg((char *)default_vimruntime_dir); | |
1666 version_msg("\"\n"); | |
1667 } | |
1668 version_msg(_("Compilation: ")); | |
1669 version_msg((char *)all_cflags); | |
1670 version_msg("\n"); | |
1671 #ifdef VMS | |
1672 if (*compiler_version != NUL) | |
1673 { | |
1674 version_msg(_("Compiler: ")); | |
1675 version_msg((char *)compiler_version); | |
1676 version_msg("\n"); | |
1677 } | |
1678 #endif | |
1679 version_msg(_("Linking: ")); | |
1680 version_msg((char *)all_lflags); | |
1681 #endif | |
1682 #ifdef DEBUG | |
1683 version_msg("\n"); | |
1684 version_msg(_(" DEBUG BUILD")); | |
1685 #endif | |
1686 } | |
1687 | |
1688 /* | |
1689 * Output a string for the version message. If it's going to wrap, output a | |
1690 * newline, unless the message is too long to fit on the screen anyway. | |
1691 */ | |
1692 static void | |
1693 version_msg(s) | |
1694 char *s; | |
1695 { | |
1696 int len = (int)STRLEN(s); | |
1697 | |
1698 if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns | |
1699 && *s != '\n') | |
1700 msg_putchar('\n'); | |
1701 if (!got_int) | |
1702 MSG_PUTS(s); | |
1703 } | |
1704 | |
1705 static void do_intro_line __ARGS((int row, char_u *mesg, int add_version, int attr)); | |
1706 | |
1707 /* | |
1708 * Give an introductory message about Vim. | |
1709 * Only used when starting Vim on an empty file, without a file name. | |
1710 * Or with the ":intro" command (for Sven :-). | |
1711 */ | |
1712 void | |
1713 intro_message(colon) | |
1714 int colon; /* TRUE for ":intro" */ | |
1715 { | |
1716 int i; | |
1717 int row; | |
1718 int blanklines; | |
1719 int sponsor; | |
1720 char *p; | |
1721 static char *(lines[]) = | |
1722 { | |
1723 N_("VIM - Vi IMproved"), | |
1724 "", | |
1725 N_("version "), | |
1726 N_("by Bram Moolenaar et al."), | |
1727 #ifdef MODIFIED_BY | |
1728 " ", | |
1729 #endif | |
1730 N_("Vim is open source and freely distributable"), | |
1731 "", | |
1732 N_("Help poor children in Uganda!"), | |
1733 N_("type :help iccf<Enter> for information "), | |
1734 "", | |
1735 N_("type :q<Enter> to exit "), | |
1736 N_("type :help<Enter> or <F1> for on-line help"), | |
26 | 1737 N_("type :help version7<Enter> for version info"), |
7 | 1738 NULL, |
1739 "", | |
1740 N_("Running in Vi compatible mode"), | |
1741 N_("type :set nocp<Enter> for Vim defaults"), | |
1742 N_("type :help cp-default<Enter> for info on this"), | |
1743 }; | |
1744 #ifdef FEAT_GUI | |
1745 static char *(gui_lines[]) = | |
1746 { | |
1747 NULL, | |
1748 NULL, | |
1749 NULL, | |
1750 NULL, | |
1751 #ifdef MODIFIED_BY | |
1752 NULL, | |
1753 #endif | |
1754 NULL, | |
1755 NULL, | |
1756 NULL, | |
1757 N_("menu Help->Orphans for information "), | |
1758 NULL, | |
1759 N_("Running modeless, typed text is inserted"), | |
1760 N_("menu Edit->Global Settings->Toggle Insert Mode "), | |
1761 N_(" for two modes "), | |
1762 NULL, | |
1763 NULL, | |
1764 NULL, | |
1765 N_("menu Edit->Global Settings->Toggle Vi Compatible"), | |
1766 N_(" for Vim defaults "), | |
1767 }; | |
1768 #endif | |
1769 | |
1770 /* blanklines = screen height - # message lines */ | |
1771 blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1); | |
1772 if (!p_cp) | |
1773 blanklines += 4; /* add 4 for not showing "Vi compatible" message */ | |
1774 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
1775 if (mch_windows95()) | |
1776 blanklines -= 3; /* subtract 3 for showing "Windows 95" message */ | |
1777 #endif | |
1778 | |
1779 #ifdef FEAT_WINDOWS | |
1780 /* Don't overwrite a statusline. Depends on 'cmdheight'. */ | |
1781 if (p_ls > 1) | |
1782 blanklines -= Rows - topframe->fr_height; | |
1783 #endif | |
1784 if (blanklines < 0) | |
1785 blanklines = 0; | |
1786 | |
1787 /* Show the sponsor and register message one out of four times, the Uganda | |
1788 * message two out of four times. */ | |
615 | 1789 sponsor = (int)time(NULL); |
7 | 1790 sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0); |
1791 | |
1792 /* start displaying the message lines after half of the blank lines */ | |
1793 row = blanklines / 2; | |
1794 if ((row >= 2 && Columns >= 50) || colon) | |
1795 { | |
1796 for (i = 0; i < (int)(sizeof(lines) / sizeof(char *)); ++i) | |
1797 { | |
1798 p = lines[i]; | |
1799 #ifdef FEAT_GUI | |
1800 if (p_im && gui.in_use && gui_lines[i] != NULL) | |
1801 p = gui_lines[i]; | |
1802 #endif | |
1803 if (p == NULL) | |
1804 { | |
1805 if (!p_cp) | |
1806 break; | |
1807 continue; | |
1808 } | |
1809 if (sponsor != 0) | |
1810 { | |
1811 if (strstr(p, "children") != NULL) | |
1812 p = sponsor < 0 | |
1813 ? N_("Sponsor Vim development!") | |
1814 : N_("Become a registered Vim user!"); | |
1815 else if (strstr(p, "iccf") != NULL) | |
1816 p = sponsor < 0 | |
1817 ? N_("type :help sponsor<Enter> for information ") | |
1818 : N_("type :help register<Enter> for information "); | |
1819 else if (strstr(p, "Orphans") != NULL) | |
1820 p = N_("menu Help->Sponsor/Register for information "); | |
1821 } | |
1822 if (*p != NUL) | |
1823 do_intro_line(row, (char_u *)_(p), i == 2, 0); | |
1824 ++row; | |
1825 } | |
1826 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
1827 if (mch_windows95()) | |
1828 { | |
1829 do_intro_line(++row, | |
1830 (char_u *)_("WARNING: Windows 95/98/ME detected"), | |
1831 FALSE, hl_attr(HLF_E)); | |
1832 do_intro_line(++row, | |
1833 (char_u *)_("type :help windows95<Enter> for info on this"), | |
1834 FALSE, 0); | |
1835 } | |
1836 #endif | |
1837 } | |
1838 | |
1839 /* Make the wait-return message appear just below the text. */ | |
1840 if (colon) | |
1841 msg_row = row; | |
1842 } | |
1843 | |
1844 static void | |
1845 do_intro_line(row, mesg, add_version, attr) | |
1846 int row; | |
1847 char_u *mesg; | |
1848 int add_version; | |
1849 int attr; | |
1850 { | |
1851 char_u vers[20]; | |
1852 int col; | |
1853 char_u *p; | |
1854 int l; | |
1855 int clen; | |
1856 #ifdef MODIFIED_BY | |
1857 # define MODBY_LEN 150 | |
1858 char_u modby[MODBY_LEN]; | |
1859 | |
1860 if (*mesg == ' ') | |
1861 { | |
1491 | 1862 vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1); |
7 | 1863 l = STRLEN(modby); |
1491 | 1864 vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1); |
7 | 1865 mesg = modby; |
1866 } | |
1867 #endif | |
1868 | |
1869 /* Center the message horizontally. */ | |
1870 col = vim_strsize(mesg); | |
1871 if (add_version) | |
1872 { | |
1873 STRCPY(vers, mediumVersion); | |
1874 if (highest_patch()) | |
1875 { | |
1876 /* Check for 9.9x or 9.9xx, alpha/beta version */ | |
2619 | 1877 if (isalpha((int)vers[3])) |
7 | 1878 { |
2619 | 1879 if (isalpha((int)vers[4])) |
7 | 1880 sprintf((char *)vers + 5, ".%d%s", highest_patch(), |
1881 mediumVersion + 5); | |
1882 else | |
1883 sprintf((char *)vers + 4, ".%d%s", highest_patch(), | |
1884 mediumVersion + 4); | |
1885 } | |
1886 else | |
1887 sprintf((char *)vers + 3, ".%d", highest_patch()); | |
1888 } | |
1889 col += (int)STRLEN(vers); | |
1890 } | |
1891 col = (Columns - col) / 2; | |
1892 if (col < 0) | |
1893 col = 0; | |
1894 | |
1895 /* Split up in parts to highlight <> items differently. */ | |
1896 for (p = mesg; *p != NUL; p += l) | |
1897 { | |
1898 clen = 0; | |
1899 for (l = 0; p[l] != NUL | |
1900 && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l) | |
1901 { | |
1902 #ifdef FEAT_MBYTE | |
1903 if (has_mbyte) | |
1904 { | |
1905 clen += ptr2cells(p + l); | |
474 | 1906 l += (*mb_ptr2len)(p + l) - 1; |
7 | 1907 } |
1908 else | |
1909 #endif | |
1910 clen += byte2cells(p[l]); | |
1911 } | |
1912 screen_puts_len(p, l, row, col, *p == '<' ? hl_attr(HLF_8) : attr); | |
1913 col += clen; | |
1914 } | |
1915 | |
1916 /* Add the version number to the version line. */ | |
1917 if (add_version) | |
1918 screen_puts(vers, row, col, 0); | |
1919 } | |
1920 | |
1921 /* | |
1922 * ":intro": clear screen, display intro screen and wait for return. | |
1923 */ | |
1924 void | |
1925 ex_intro(eap) | |
1876 | 1926 exarg_T *eap UNUSED; |
7 | 1927 { |
1928 screenclear(); | |
1929 intro_message(TRUE); | |
1930 wait_return(TRUE); | |
1931 } |