Mercurial > vim
annotate src/version.c @ 3028:3f822e54765c v7.3.286
updated for version 7.3.286
Problem: Crash when using "zd" on a large number of folds. (Sam King)
Solution: Recompute pointer after reallocating array. Move fewer entries
when making room.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 26 Aug 2011 16:13:00 +0200 |
parents | 6018c815e120 |
children | 07bc2ccfe555 |
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 /**/ | |
3028 | 713 286, |
714 /**/ | |
3026 | 715 285, |
716 /**/ | |
3024 | 717 284, |
718 /**/ | |
3022 | 719 283, |
720 /**/ | |
3020 | 721 282, |
722 /**/ | |
3018 | 723 281, |
724 /**/ | |
3016 | 725 280, |
726 /**/ | |
3014 | 727 279, |
728 /**/ | |
3012 | 729 278, |
730 /**/ | |
3010 | 731 277, |
732 /**/ | |
3008 | 733 276, |
734 /**/ | |
3006 | 735 275, |
736 /**/ | |
3004 | 737 274, |
738 /**/ | |
3002 | 739 273, |
740 /**/ | |
3000 | 741 272, |
742 /**/ | |
2998 | 743 271, |
744 /**/ | |
2996 | 745 270, |
746 /**/ | |
2994 | 747 269, |
748 /**/ | |
2992 | 749 268, |
750 /**/ | |
2990 | 751 267, |
752 /**/ | |
2988 | 753 266, |
754 /**/ | |
2986 | 755 265, |
756 /**/ | |
2984 | 757 264, |
758 /**/ | |
2982 | 759 263, |
760 /**/ | |
2980 | 761 262, |
762 /**/ | |
2978 | 763 261, |
764 /**/ | |
2976 | 765 260, |
766 /**/ | |
2974 | 767 259, |
768 /**/ | |
2972 | 769 258, |
770 /**/ | |
2970 | 771 257, |
772 /**/ | |
2968 | 773 256, |
774 /**/ | |
2966 | 775 255, |
776 /**/ | |
2963 | 777 254, |
778 /**/ | |
2961 | 779 253, |
780 /**/ | |
2959 | 781 252, |
782 /**/ | |
2957 | 783 251, |
784 /**/ | |
2955 | 785 250, |
786 /**/ | |
2953 | 787 249, |
788 /**/ | |
2951 | 789 248, |
790 /**/ | |
2949 | 791 247, |
792 /**/ | |
2947 | 793 246, |
794 /**/ | |
2945 | 795 245, |
796 /**/ | |
2943 | 797 244, |
798 /**/ | |
2941 | 799 243, |
800 /**/ | |
2939 | 801 242, |
802 /**/ | |
2937 | 803 241, |
804 /**/ | |
2935 | 805 240, |
806 /**/ | |
2933 | 807 239, |
808 /**/ | |
2931 | 809 238, |
810 /**/ | |
2929 | 811 237, |
812 /**/ | |
2927 | 813 236, |
814 /**/ | |
2925 | 815 235, |
816 /**/ | |
2923 | 817 234, |
818 /**/ | |
2921 | 819 233, |
820 /**/ | |
2919 | 821 232, |
822 /**/ | |
2917 | 823 231, |
824 /**/ | |
2915 | 825 230, |
826 /**/ | |
2913 | 827 229, |
828 /**/ | |
2911 | 829 228, |
830 /**/ | |
2909 | 831 227, |
832 /**/ | |
2906 | 833 226, |
834 /**/ | |
2904 | 835 225, |
836 /**/ | |
2902 | 837 224, |
838 /**/ | |
2900 | 839 223, |
840 /**/ | |
2898 | 841 222, |
842 /**/ | |
2896 | 843 221, |
844 /**/ | |
2894 | 845 220, |
846 /**/ | |
2891 | 847 219, |
848 /**/ | |
2889 | 849 218, |
850 /**/ | |
2887 | 851 217, |
852 /**/ | |
2885 | 853 216, |
854 /**/ | |
2883 | 855 215, |
856 /**/ | |
2881 | 857 214, |
858 /**/ | |
2879 | 859 213, |
860 /**/ | |
2877 | 861 212, |
862 /**/ | |
2875 | 863 211, |
864 /**/ | |
2873 | 865 210, |
866 /**/ | |
2871 | 867 209, |
868 /**/ | |
2869 | 869 208, |
870 /**/ | |
2867 | 871 207, |
872 /**/ | |
2865 | 873 206, |
874 /**/ | |
2863 | 875 205, |
876 /**/ | |
2861 | 877 204, |
878 /**/ | |
2859 | 879 203, |
880 /**/ | |
2857 | 881 202, |
882 /**/ | |
2855 | 883 201, |
884 /**/ | |
2853 | 885 200, |
886 /**/ | |
2851 | 887 199, |
888 /**/ | |
2849 | 889 198, |
890 /**/ | |
2847 | 891 197, |
892 /**/ | |
2845 | 893 196, |
894 /**/ | |
2843 | 895 195, |
896 /**/ | |
2841 | 897 194, |
898 /**/ | |
2839 | 899 193, |
900 /**/ | |
2837 | 901 192, |
902 /**/ | |
2834 | 903 191, |
904 /**/ | |
2831 | 905 190, |
906 /**/ | |
2829 | 907 189, |
908 /**/ | |
2827 | 909 188, |
910 /**/ | |
2823 | 911 187, |
912 /**/ | |
2821 | 913 186, |
914 /**/ | |
2819 | 915 185, |
916 /**/ | |
2817 | 917 184, |
918 /**/ | |
2815 | 919 183, |
920 /**/ | |
2813 | 921 182, |
922 /**/ | |
2811 | 923 181, |
924 /**/ | |
2809 | 925 180, |
926 /**/ | |
2807 | 927 179, |
928 /**/ | |
2805 | 929 178, |
930 /**/ | |
2803 | 931 177, |
932 /**/ | |
2801 | 933 176, |
934 /**/ | |
2799 | 935 175, |
936 /**/ | |
2797 | 937 174, |
938 /**/ | |
2795 | 939 173, |
940 /**/ | |
2793 | 941 172, |
942 /**/ | |
2791 | 943 171, |
944 /**/ | |
2789 | 945 170, |
946 /**/ | |
2786 | 947 169, |
948 /**/ | |
2784 | 949 168, |
950 /**/ | |
2782 | 951 167, |
952 /**/ | |
2780 | 953 166, |
954 /**/ | |
2778 | 955 165, |
956 /**/ | |
2776 | 957 164, |
958 /**/ | |
2774 | 959 163, |
960 /**/ | |
2772 | 961 162, |
962 /**/ | |
2770 | 963 161, |
964 /**/ | |
2768 | 965 160, |
966 /**/ | |
2766 | 967 159, |
968 /**/ | |
2764 | 969 158, |
970 /**/ | |
2762 | 971 157, |
972 /**/ | |
2760 | 973 156, |
974 /**/ | |
2758 | 975 155, |
976 /**/ | |
2756 | 977 154, |
978 /**/ | |
2754 | 979 153, |
980 /**/ | |
2752 | 981 152, |
982 /**/ | |
2749 | 983 151, |
984 /**/ | |
2747 | 985 150, |
986 /**/ | |
2745 | 987 149, |
988 /**/ | |
2743 | 989 148, |
990 /**/ | |
2741 | 991 147, |
992 /**/ | |
2739 | 993 146, |
994 /**/ | |
2737 | 995 145, |
996 /**/ | |
2735 | 997 144, |
998 /**/ | |
2730 | 999 143, |
1000 /**/ | |
2727 | 1001 142, |
1002 /**/ | |
2726 | 1003 141, |
1004 /**/ | |
2724 | 1005 140, |
1006 /**/ | |
2723 | 1007 139, |
1008 /**/ | |
2722 | 1009 138, |
1010 /**/ | |
2721 | 1011 137, |
1012 /**/ | |
2720 | 1013 136, |
1014 /**/ | |
2719 | 1015 135, |
1016 /**/ | |
2718 | 1017 134, |
1018 /**/ | |
2717 | 1019 133, |
1020 /**/ | |
2716 | 1021 132, |
1022 /**/ | |
2715 | 1023 131, |
1024 /**/ | |
2714 | 1025 130, |
1026 /**/ | |
2713 | 1027 129, |
1028 /**/ | |
2712 | 1029 128, |
1030 /**/ | |
2711 | 1031 127, |
1032 /**/ | |
2710 | 1033 126, |
1034 /**/ | |
2708 | 1035 125, |
1036 /**/ | |
2707 | 1037 124, |
1038 /**/ | |
2706 | 1039 123, |
1040 /**/ | |
2705 | 1041 122, |
1042 /**/ | |
2704 | 1043 121, |
1044 /**/ | |
2703 | 1045 120, |
1046 /**/ | |
2702 | 1047 119, |
1048 /**/ | |
2701 | 1049 118, |
1050 /**/ | |
2700 | 1051 117, |
1052 /**/ | |
2699 | 1053 116, |
1054 /**/ | |
2697 | 1055 115, |
1056 /**/ | |
2696 | 1057 114, |
1058 /**/ | |
2695 | 1059 113, |
1060 /**/ | |
2694 | 1061 112, |
1062 /**/ | |
2693 | 1063 111, |
1064 /**/ | |
2692 | 1065 110, |
1066 /**/ | |
2691 | 1067 109, |
1068 /**/ | |
2690 | 1069 108, |
1070 /**/ | |
2689 | 1071 107, |
1072 /**/ | |
2688 | 1073 106, |
1074 /**/ | |
2687 | 1075 105, |
1076 /**/ | |
2686 | 1077 104, |
1078 /**/ | |
2685 | 1079 103, |
1080 /**/ | |
2684 | 1081 102, |
1082 /**/ | |
2683 | 1083 101, |
1084 /**/ | |
2682 | 1085 100, |
1086 /**/ | |
2680 | 1087 99, |
1088 /**/ | |
2679 | 1089 98, |
1090 /**/ | |
2678 | 1091 97, |
1092 /**/ | |
2677 | 1093 96, |
1094 /**/ | |
2676 | 1095 95, |
1096 /**/ | |
2675 | 1097 94, |
1098 /**/ | |
2674 | 1099 93, |
1100 /**/ | |
2673 | 1101 92, |
1102 /**/ | |
2672 | 1103 91, |
1104 /**/ | |
2671 | 1105 90, |
1106 /**/ | |
2670 | 1107 89, |
1108 /**/ | |
2669 | 1109 88, |
1110 /**/ | |
2668 | 1111 87, |
1112 /**/ | |
2667 | 1113 86, |
1114 /**/ | |
2666 | 1115 85, |
1116 /**/ | |
2665 | 1117 84, |
1118 /**/ | |
2664 | 1119 83, |
1120 /**/ | |
2663 | 1121 82, |
1122 /**/ | |
2661 | 1123 81, |
1124 /**/ | |
2660 | 1125 80, |
1126 /**/ | |
2659 | 1127 79, |
1128 /**/ | |
2658 | 1129 78, |
1130 /**/ | |
2657 | 1131 77, |
1132 /**/ | |
2656 | 1133 76, |
1134 /**/ | |
2655 | 1135 75, |
1136 /**/ | |
2654 | 1137 74, |
1138 /**/ | |
2653 | 1139 73, |
1140 /**/ | |
2652 | 1141 72, |
1142 /**/ | |
2651 | 1143 71, |
1144 /**/ | |
2650 | 1145 70, |
1146 /**/ | |
2649 | 1147 69, |
1148 /**/ | |
2648 | 1149 68, |
1150 /**/ | |
2647 | 1151 67, |
1152 /**/ | |
2646 | 1153 66, |
1154 /**/ | |
2645 | 1155 65, |
1156 /**/ | |
2644 | 1157 64, |
1158 /**/ | |
2643 | 1159 63, |
1160 /**/ | |
2641 | 1161 62, |
1162 /**/ | |
2640 | 1163 61, |
1164 /**/ | |
2639 | 1165 60, |
1166 /**/ | |
2638 | 1167 59, |
1168 /**/ | |
2637 | 1169 58, |
1170 /**/ | |
2636 | 1171 57, |
1172 /**/ | |
2635 | 1173 56, |
1174 /**/ | |
2634 | 1175 55, |
1176 /**/ | |
2633 | 1177 54, |
1178 /**/ | |
2632 | 1179 53, |
1180 /**/ | |
2631 | 1181 52, |
1182 /**/ | |
2630 | 1183 51, |
1184 /**/ | |
2629 | 1185 50, |
1186 /**/ | |
2628 | 1187 49, |
1188 /**/ | |
2627 | 1189 48, |
1190 /**/ | |
2626 | 1191 47, |
1192 /**/ | |
2624 | 1193 46, |
1194 /**/ | |
2623 | 1195 45, |
1196 /**/ | |
2622 | 1197 44, |
1198 /**/ | |
2621 | 1199 43, |
1200 /**/ | |
2620 | 1201 42, |
1202 /**/ | |
2619 | 1203 41, |
1204 /**/ | |
2618 | 1205 40, |
1206 /**/ | |
2617 | 1207 39, |
1208 /**/ | |
2616 | 1209 38, |
1210 /**/ | |
2615 | 1211 37, |
1212 /**/ | |
2614 | 1213 36, |
1214 /**/ | |
2613 | 1215 35, |
1216 /**/ | |
2612 | 1217 34, |
1218 /**/ | |
2611 | 1219 33, |
1220 /**/ | |
2610 | 1221 32, |
1222 /**/ | |
2609 | 1223 31, |
1224 /**/ | |
2607 | 1225 30, |
1226 /**/ | |
2606 | 1227 29, |
1228 /**/ | |
2605 | 1229 28, |
1230 /**/ | |
2604 | 1231 27, |
1232 /**/ | |
2603 | 1233 26, |
1234 /**/ | |
2602 | 1235 25, |
1236 /**/ | |
2601 | 1237 24, |
1238 /**/ | |
2600 | 1239 23, |
1240 /**/ | |
2599 | 1241 22, |
1242 /**/ | |
2598 | 1243 21, |
1244 /**/ | |
2597 | 1245 20, |
1246 /**/ | |
2595 | 1247 19, |
1248 /**/ | |
2594 | 1249 18, |
1250 /**/ | |
2593 | 1251 17, |
1252 /**/ | |
2592 | 1253 16, |
1254 /**/ | |
2591 | 1255 15, |
1256 /**/ | |
2590 | 1257 14, |
1258 /**/ | |
2589 | 1259 13, |
1260 /**/ | |
2588 | 1261 12, |
1262 /**/ | |
2586 | 1263 11, |
1264 /**/ | |
2585 | 1265 10, |
1266 /**/ | |
2584 | 1267 9, |
1268 /**/ | |
2583 | 1269 8, |
1270 /**/ | |
2582 | 1271 7, |
1272 /**/ | |
2580 | 1273 6, |
1274 /**/ | |
2579 | 1275 5, |
1276 /**/ | |
2578 | 1277 4, |
1278 /**/ | |
2165
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1279 3, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1280 /**/ |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1281 2, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1282 /**/ |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1283 1, |
733f0dc510c3
Undo changes that are meant for the Vim 7.3 branch.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
1284 /**/ |
7 | 1285 0 |
1286 }; | |
1287 | |
1760 | 1288 /* |
1289 * Place to put a short description when adding a feature with a patch. | |
1290 * Keep it short, e.g.,: "relative numbers", "persistent undo". | |
1291 * Also add a comment marker to separate the lines. | |
1292 * See the official Vim patches for the diff format: It must use a context of | |
1777 | 1293 * one line only. Create it by hand or use "diff -C2" and edit the patch. |
1760 | 1294 */ |
1295 static char *(extra_patches[]) = | |
1296 { /* Add your patch description below this line */ | |
1297 /**/ | |
1298 NULL | |
1299 }; | |
1300 | |
7 | 1301 int |
1302 highest_patch() | |
1303 { | |
1304 int i; | |
1305 int h = 0; | |
1306 | |
1307 for (i = 0; included_patches[i] != 0; ++i) | |
1308 if (included_patches[i] > h) | |
1309 h = included_patches[i]; | |
1310 return h; | |
1311 } | |
1312 | |
1313 #if defined(FEAT_EVAL) || defined(PROTO) | |
1314 /* | |
1315 * Return TRUE if patch "n" has been included. | |
1316 */ | |
1317 int | |
1318 has_patch(n) | |
1319 int n; | |
1320 { | |
1321 int i; | |
1322 | |
1323 for (i = 0; included_patches[i] != 0; ++i) | |
1324 if (included_patches[i] == n) | |
1325 return TRUE; | |
1326 return FALSE; | |
1327 } | |
1328 #endif | |
1329 | |
1330 void | |
1331 ex_version(eap) | |
1332 exarg_T *eap; | |
1333 { | |
1334 /* | |
1335 * Ignore a ":version 9.99" command. | |
1336 */ | |
1337 if (*eap->arg == NUL) | |
1338 { | |
1339 msg_putchar('\n'); | |
1340 list_version(); | |
1341 } | |
1342 } | |
1343 | |
1344 void | |
1345 list_version() | |
1346 { | |
1347 int i; | |
1348 int first; | |
1349 char *s = ""; | |
1350 | |
1351 /* | |
1352 * When adding features here, don't forget to update the list of | |
1353 * internal variables in eval.c! | |
1354 */ | |
1355 MSG(longVersion); | |
1356 #ifdef WIN3264 | |
1357 # ifdef FEAT_GUI_W32 | |
1358 # if defined(_MSC_VER) && (_MSC_VER <= 1010) | |
1359 /* Only MS VC 4.1 and earlier can do Win32s */ | |
1607 | 1360 MSG_PUTS(_("\nMS-Windows 16/32-bit GUI version")); |
7 | 1361 # else |
990 | 1362 # ifdef _WIN64 |
1607 | 1363 MSG_PUTS(_("\nMS-Windows 64-bit GUI version")); |
990 | 1364 # else |
1607 | 1365 MSG_PUTS(_("\nMS-Windows 32-bit GUI version")); |
990 | 1366 # endif |
7 | 1367 # endif |
1368 if (gui_is_win32s()) | |
1369 MSG_PUTS(_(" in Win32s mode")); | |
1370 # ifdef FEAT_OLE | |
1371 MSG_PUTS(_(" with OLE support")); | |
1372 # endif | |
1373 # else | |
1607 | 1374 # ifdef _WIN64 |
1375 MSG_PUTS(_("\nMS-Windows 64-bit console version")); | |
1376 # else | |
1377 MSG_PUTS(_("\nMS-Windows 32-bit console version")); | |
1378 # endif | |
7 | 1379 # endif |
1380 #endif | |
1381 #ifdef WIN16 | |
1607 | 1382 MSG_PUTS(_("\nMS-Windows 16-bit version")); |
7 | 1383 #endif |
1384 #ifdef MSDOS | |
1385 # ifdef DJGPP | |
1607 | 1386 MSG_PUTS(_("\n32-bit MS-DOS version")); |
7 | 1387 # else |
1607 | 1388 MSG_PUTS(_("\n16-bit MS-DOS version")); |
7 | 1389 # endif |
1390 #endif | |
1391 #ifdef MACOS | |
1392 # ifdef MACOS_X | |
1393 # ifdef MACOS_X_UNIX | |
1394 MSG_PUTS(_("\nMacOS X (unix) version")); | |
1395 # else | |
1396 MSG_PUTS(_("\nMacOS X version")); | |
1397 # endif | |
1398 #else | |
1399 MSG_PUTS(_("\nMacOS version")); | |
1400 # endif | |
1401 #endif | |
1402 | |
1403 #ifdef VMS | |
1705 | 1404 MSG_PUTS(_("\nOpenVMS version")); |
1045 | 1405 # ifdef HAVE_PATHDEF |
1406 if (*compiled_arch != NUL) | |
1407 { | |
1408 MSG_PUTS(" - "); | |
1409 MSG_PUTS(compiled_arch); | |
1410 } | |
1411 # endif | |
1412 | |
7 | 1413 #endif |
1414 | |
1415 /* Print the list of patch numbers if there is at least one. */ | |
1416 /* Print a range when patches are consecutive: "1-10, 12, 15-40, 42-45" */ | |
1417 if (included_patches[0] != 0) | |
1418 { | |
1419 MSG_PUTS(_("\nIncluded patches: ")); | |
1420 first = -1; | |
1421 /* find last one */ | |
1422 for (i = 0; included_patches[i] != 0; ++i) | |
1423 ; | |
1424 while (--i >= 0) | |
1425 { | |
1426 if (first < 0) | |
1427 first = included_patches[i]; | |
1428 if (i == 0 || included_patches[i - 1] != included_patches[i] + 1) | |
1429 { | |
1430 MSG_PUTS(s); | |
1431 s = ", "; | |
1432 msg_outnum((long)first); | |
1433 if (first != included_patches[i]) | |
1434 { | |
1435 MSG_PUTS("-"); | |
1436 msg_outnum((long)included_patches[i]); | |
1437 } | |
1438 first = -1; | |
1439 } | |
1440 } | |
1441 } | |
1442 | |
1760 | 1443 /* Print the list of extra patch descriptions if there is at least one. */ |
1444 if (extra_patches[0] != NULL) | |
1445 { | |
1446 MSG_PUTS(_("\nExtra patches: ")); | |
1447 s = ""; | |
1448 for (i = 0; extra_patches[i] != NULL; ++i) | |
1449 { | |
1450 MSG_PUTS(s); | |
1451 s = ", "; | |
1452 MSG_PUTS(extra_patches[i]); | |
1453 } | |
1454 } | |
1455 | |
7 | 1456 #ifdef MODIFIED_BY |
1457 MSG_PUTS("\n"); | |
1458 MSG_PUTS(_("Modified by ")); | |
1459 MSG_PUTS(MODIFIED_BY); | |
1460 #endif | |
1461 | |
1462 #ifdef HAVE_PATHDEF | |
1463 if (*compiled_user != NUL || *compiled_sys != NUL) | |
1464 { | |
1465 MSG_PUTS(_("\nCompiled ")); | |
1466 if (*compiled_user != NUL) | |
1467 { | |
1468 MSG_PUTS(_("by ")); | |
1469 MSG_PUTS(compiled_user); | |
1470 } | |
1471 if (*compiled_sys != NUL) | |
1472 { | |
1473 MSG_PUTS("@"); | |
1474 MSG_PUTS(compiled_sys); | |
1475 } | |
1476 } | |
1477 #endif | |
1478 | |
1479 #ifdef FEAT_HUGE | |
1480 MSG_PUTS(_("\nHuge version ")); | |
1481 #else | |
1482 # ifdef FEAT_BIG | |
1483 MSG_PUTS(_("\nBig version ")); | |
1484 # else | |
1485 # ifdef FEAT_NORMAL | |
1486 MSG_PUTS(_("\nNormal version ")); | |
1487 # else | |
1488 # ifdef FEAT_SMALL | |
1489 MSG_PUTS(_("\nSmall version ")); | |
1490 # else | |
1491 MSG_PUTS(_("\nTiny version ")); | |
1492 # endif | |
1493 # endif | |
1494 # endif | |
1495 #endif | |
1496 #ifndef FEAT_GUI | |
1497 MSG_PUTS(_("without GUI.")); | |
1498 #else | |
1499 # ifdef FEAT_GUI_GTK | |
1500 # ifdef FEAT_GUI_GNOME | |
1501 MSG_PUTS(_("with GTK2-GNOME GUI.")); | |
1502 # else | |
1503 MSG_PUTS(_("with GTK2 GUI.")); | |
1504 # endif | |
1505 # else | |
1506 # ifdef FEAT_GUI_MOTIF | |
1507 MSG_PUTS(_("with X11-Motif GUI.")); | |
1508 # else | |
1509 # ifdef FEAT_GUI_ATHENA | |
1510 # ifdef FEAT_GUI_NEXTAW | |
1511 MSG_PUTS(_("with X11-neXtaw GUI.")); | |
1512 # else | |
1513 MSG_PUTS(_("with X11-Athena GUI.")); | |
1514 # endif | |
1515 # else | |
1516 # ifdef FEAT_GUI_PHOTON | |
1517 MSG_PUTS(_("with Photon GUI.")); | |
1518 # else | |
1519 # if defined(MSWIN) | |
1520 MSG_PUTS(_("with GUI.")); | |
1521 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1522 # if defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON |
7 | 1523 MSG_PUTS(_("with Carbon GUI.")); |
1524 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1525 # if defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX |
7 | 1526 MSG_PUTS(_("with Cocoa GUI.")); |
1527 # else | |
2250
1bac28a53fae
Add the conceal patch from Vince Negri.
Bram Moolenaar <bram@vim.org>
parents:
2214
diff
changeset
|
1528 # if defined(MACOS) |
7 | 1529 MSG_PUTS(_("with (classic) GUI.")); |
1530 # endif | |
1531 # endif | |
1532 # endif | |
1533 # endif | |
1534 # endif | |
1535 # endif | |
1536 # endif | |
1537 # endif | |
1538 #endif | |
1539 version_msg(_(" Features included (+) or not (-):\n")); | |
1540 | |
1541 /* print all the features */ | |
1542 for (i = 0; features[i] != NULL; ++i) | |
1543 { | |
1544 version_msg(features[i]); | |
1545 if (msg_col > 0) | |
1546 version_msg(" "); | |
1547 } | |
1548 | |
1549 version_msg("\n"); | |
1550 #ifdef SYS_VIMRC_FILE | |
1551 version_msg(_(" system vimrc file: \"")); | |
1552 version_msg(SYS_VIMRC_FILE); | |
1553 version_msg("\"\n"); | |
1554 #endif | |
1555 #ifdef USR_VIMRC_FILE | |
1556 version_msg(_(" user vimrc file: \"")); | |
1557 version_msg(USR_VIMRC_FILE); | |
1558 version_msg("\"\n"); | |
1559 #endif | |
1560 #ifdef USR_VIMRC_FILE2 | |
1561 version_msg(_(" 2nd user vimrc file: \"")); | |
1562 version_msg(USR_VIMRC_FILE2); | |
1563 version_msg("\"\n"); | |
1564 #endif | |
1565 #ifdef USR_VIMRC_FILE3 | |
1566 version_msg(_(" 3rd user vimrc file: \"")); | |
1567 version_msg(USR_VIMRC_FILE3); | |
1568 version_msg("\"\n"); | |
1569 #endif | |
1570 #ifdef USR_EXRC_FILE | |
1571 version_msg(_(" user exrc file: \"")); | |
1572 version_msg(USR_EXRC_FILE); | |
1573 version_msg("\"\n"); | |
1574 #endif | |
1575 #ifdef USR_EXRC_FILE2 | |
1576 version_msg(_(" 2nd user exrc file: \"")); | |
1577 version_msg(USR_EXRC_FILE2); | |
1578 version_msg("\"\n"); | |
1579 #endif | |
1580 #ifdef FEAT_GUI | |
1581 # ifdef SYS_GVIMRC_FILE | |
1582 version_msg(_(" system gvimrc file: \"")); | |
1583 version_msg(SYS_GVIMRC_FILE); | |
1584 version_msg("\"\n"); | |
1585 # endif | |
1586 version_msg(_(" user gvimrc file: \"")); | |
1587 version_msg(USR_GVIMRC_FILE); | |
1588 version_msg("\"\n"); | |
1589 # ifdef USR_GVIMRC_FILE2 | |
1590 version_msg(_("2nd user gvimrc file: \"")); | |
1591 version_msg(USR_GVIMRC_FILE2); | |
1592 version_msg("\"\n"); | |
1593 # endif | |
1594 # ifdef USR_GVIMRC_FILE3 | |
1595 version_msg(_("3rd user gvimrc file: \"")); | |
1596 version_msg(USR_GVIMRC_FILE3); | |
1597 version_msg("\"\n"); | |
1598 # endif | |
1599 #endif | |
1600 #ifdef FEAT_GUI | |
1601 # ifdef SYS_MENU_FILE | |
1602 version_msg(_(" system menu file: \"")); | |
1603 version_msg(SYS_MENU_FILE); | |
1604 version_msg("\"\n"); | |
1605 # endif | |
1606 #endif | |
1607 #ifdef HAVE_PATHDEF | |
1608 if (*default_vim_dir != NUL) | |
1609 { | |
1610 version_msg(_(" fall-back for $VIM: \"")); | |
1611 version_msg((char *)default_vim_dir); | |
1612 version_msg("\"\n"); | |
1613 } | |
1614 if (*default_vimruntime_dir != NUL) | |
1615 { | |
1616 version_msg(_(" f-b for $VIMRUNTIME: \"")); | |
1617 version_msg((char *)default_vimruntime_dir); | |
1618 version_msg("\"\n"); | |
1619 } | |
1620 version_msg(_("Compilation: ")); | |
1621 version_msg((char *)all_cflags); | |
1622 version_msg("\n"); | |
1623 #ifdef VMS | |
1624 if (*compiler_version != NUL) | |
1625 { | |
1626 version_msg(_("Compiler: ")); | |
1627 version_msg((char *)compiler_version); | |
1628 version_msg("\n"); | |
1629 } | |
1630 #endif | |
1631 version_msg(_("Linking: ")); | |
1632 version_msg((char *)all_lflags); | |
1633 #endif | |
1634 #ifdef DEBUG | |
1635 version_msg("\n"); | |
1636 version_msg(_(" DEBUG BUILD")); | |
1637 #endif | |
1638 } | |
1639 | |
1640 /* | |
1641 * Output a string for the version message. If it's going to wrap, output a | |
1642 * newline, unless the message is too long to fit on the screen anyway. | |
1643 */ | |
1644 static void | |
1645 version_msg(s) | |
1646 char *s; | |
1647 { | |
1648 int len = (int)STRLEN(s); | |
1649 | |
1650 if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns | |
1651 && *s != '\n') | |
1652 msg_putchar('\n'); | |
1653 if (!got_int) | |
1654 MSG_PUTS(s); | |
1655 } | |
1656 | |
1657 static void do_intro_line __ARGS((int row, char_u *mesg, int add_version, int attr)); | |
1658 | |
1659 /* | |
1660 * Give an introductory message about Vim. | |
1661 * Only used when starting Vim on an empty file, without a file name. | |
1662 * Or with the ":intro" command (for Sven :-). | |
1663 */ | |
1664 void | |
1665 intro_message(colon) | |
1666 int colon; /* TRUE for ":intro" */ | |
1667 { | |
1668 int i; | |
1669 int row; | |
1670 int blanklines; | |
1671 int sponsor; | |
1672 char *p; | |
1673 static char *(lines[]) = | |
1674 { | |
1675 N_("VIM - Vi IMproved"), | |
1676 "", | |
1677 N_("version "), | |
1678 N_("by Bram Moolenaar et al."), | |
1679 #ifdef MODIFIED_BY | |
1680 " ", | |
1681 #endif | |
1682 N_("Vim is open source and freely distributable"), | |
1683 "", | |
1684 N_("Help poor children in Uganda!"), | |
1685 N_("type :help iccf<Enter> for information "), | |
1686 "", | |
1687 N_("type :q<Enter> to exit "), | |
1688 N_("type :help<Enter> or <F1> for on-line help"), | |
26 | 1689 N_("type :help version7<Enter> for version info"), |
7 | 1690 NULL, |
1691 "", | |
1692 N_("Running in Vi compatible mode"), | |
1693 N_("type :set nocp<Enter> for Vim defaults"), | |
1694 N_("type :help cp-default<Enter> for info on this"), | |
1695 }; | |
1696 #ifdef FEAT_GUI | |
1697 static char *(gui_lines[]) = | |
1698 { | |
1699 NULL, | |
1700 NULL, | |
1701 NULL, | |
1702 NULL, | |
1703 #ifdef MODIFIED_BY | |
1704 NULL, | |
1705 #endif | |
1706 NULL, | |
1707 NULL, | |
1708 NULL, | |
1709 N_("menu Help->Orphans for information "), | |
1710 NULL, | |
1711 N_("Running modeless, typed text is inserted"), | |
1712 N_("menu Edit->Global Settings->Toggle Insert Mode "), | |
1713 N_(" for two modes "), | |
1714 NULL, | |
1715 NULL, | |
1716 NULL, | |
1717 N_("menu Edit->Global Settings->Toggle Vi Compatible"), | |
1718 N_(" for Vim defaults "), | |
1719 }; | |
1720 #endif | |
1721 | |
1722 /* blanklines = screen height - # message lines */ | |
1723 blanklines = (int)Rows - ((sizeof(lines) / sizeof(char *)) - 1); | |
1724 if (!p_cp) | |
1725 blanklines += 4; /* add 4 for not showing "Vi compatible" message */ | |
1726 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
1727 if (mch_windows95()) | |
1728 blanklines -= 3; /* subtract 3 for showing "Windows 95" message */ | |
1729 #endif | |
1730 | |
1731 #ifdef FEAT_WINDOWS | |
1732 /* Don't overwrite a statusline. Depends on 'cmdheight'. */ | |
1733 if (p_ls > 1) | |
1734 blanklines -= Rows - topframe->fr_height; | |
1735 #endif | |
1736 if (blanklines < 0) | |
1737 blanklines = 0; | |
1738 | |
1739 /* Show the sponsor and register message one out of four times, the Uganda | |
1740 * message two out of four times. */ | |
615 | 1741 sponsor = (int)time(NULL); |
7 | 1742 sponsor = ((sponsor & 2) == 0) - ((sponsor & 4) == 0); |
1743 | |
1744 /* start displaying the message lines after half of the blank lines */ | |
1745 row = blanklines / 2; | |
1746 if ((row >= 2 && Columns >= 50) || colon) | |
1747 { | |
1748 for (i = 0; i < (int)(sizeof(lines) / sizeof(char *)); ++i) | |
1749 { | |
1750 p = lines[i]; | |
1751 #ifdef FEAT_GUI | |
1752 if (p_im && gui.in_use && gui_lines[i] != NULL) | |
1753 p = gui_lines[i]; | |
1754 #endif | |
1755 if (p == NULL) | |
1756 { | |
1757 if (!p_cp) | |
1758 break; | |
1759 continue; | |
1760 } | |
1761 if (sponsor != 0) | |
1762 { | |
1763 if (strstr(p, "children") != NULL) | |
1764 p = sponsor < 0 | |
1765 ? N_("Sponsor Vim development!") | |
1766 : N_("Become a registered Vim user!"); | |
1767 else if (strstr(p, "iccf") != NULL) | |
1768 p = sponsor < 0 | |
1769 ? N_("type :help sponsor<Enter> for information ") | |
1770 : N_("type :help register<Enter> for information "); | |
1771 else if (strstr(p, "Orphans") != NULL) | |
1772 p = N_("menu Help->Sponsor/Register for information "); | |
1773 } | |
1774 if (*p != NUL) | |
1775 do_intro_line(row, (char_u *)_(p), i == 2, 0); | |
1776 ++row; | |
1777 } | |
1778 #if defined(WIN3264) && !defined(FEAT_GUI_W32) | |
1779 if (mch_windows95()) | |
1780 { | |
1781 do_intro_line(++row, | |
1782 (char_u *)_("WARNING: Windows 95/98/ME detected"), | |
1783 FALSE, hl_attr(HLF_E)); | |
1784 do_intro_line(++row, | |
1785 (char_u *)_("type :help windows95<Enter> for info on this"), | |
1786 FALSE, 0); | |
1787 } | |
1788 #endif | |
1789 } | |
1790 | |
1791 /* Make the wait-return message appear just below the text. */ | |
1792 if (colon) | |
1793 msg_row = row; | |
1794 } | |
1795 | |
1796 static void | |
1797 do_intro_line(row, mesg, add_version, attr) | |
1798 int row; | |
1799 char_u *mesg; | |
1800 int add_version; | |
1801 int attr; | |
1802 { | |
1803 char_u vers[20]; | |
1804 int col; | |
1805 char_u *p; | |
1806 int l; | |
1807 int clen; | |
1808 #ifdef MODIFIED_BY | |
1809 # define MODBY_LEN 150 | |
1810 char_u modby[MODBY_LEN]; | |
1811 | |
1812 if (*mesg == ' ') | |
1813 { | |
1491 | 1814 vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1); |
7 | 1815 l = STRLEN(modby); |
1491 | 1816 vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1); |
7 | 1817 mesg = modby; |
1818 } | |
1819 #endif | |
1820 | |
1821 /* Center the message horizontally. */ | |
1822 col = vim_strsize(mesg); | |
1823 if (add_version) | |
1824 { | |
1825 STRCPY(vers, mediumVersion); | |
1826 if (highest_patch()) | |
1827 { | |
1828 /* Check for 9.9x or 9.9xx, alpha/beta version */ | |
2619 | 1829 if (isalpha((int)vers[3])) |
7 | 1830 { |
2619 | 1831 if (isalpha((int)vers[4])) |
7 | 1832 sprintf((char *)vers + 5, ".%d%s", highest_patch(), |
1833 mediumVersion + 5); | |
1834 else | |
1835 sprintf((char *)vers + 4, ".%d%s", highest_patch(), | |
1836 mediumVersion + 4); | |
1837 } | |
1838 else | |
1839 sprintf((char *)vers + 3, ".%d", highest_patch()); | |
1840 } | |
1841 col += (int)STRLEN(vers); | |
1842 } | |
1843 col = (Columns - col) / 2; | |
1844 if (col < 0) | |
1845 col = 0; | |
1846 | |
1847 /* Split up in parts to highlight <> items differently. */ | |
1848 for (p = mesg; *p != NUL; p += l) | |
1849 { | |
1850 clen = 0; | |
1851 for (l = 0; p[l] != NUL | |
1852 && (l == 0 || (p[l] != '<' && p[l - 1] != '>')); ++l) | |
1853 { | |
1854 #ifdef FEAT_MBYTE | |
1855 if (has_mbyte) | |
1856 { | |
1857 clen += ptr2cells(p + l); | |
474 | 1858 l += (*mb_ptr2len)(p + l) - 1; |
7 | 1859 } |
1860 else | |
1861 #endif | |
1862 clen += byte2cells(p[l]); | |
1863 } | |
1864 screen_puts_len(p, l, row, col, *p == '<' ? hl_attr(HLF_8) : attr); | |
1865 col += clen; | |
1866 } | |
1867 | |
1868 /* Add the version number to the version line. */ | |
1869 if (add_version) | |
1870 screen_puts(vers, row, col, 0); | |
1871 } | |
1872 | |
1873 /* | |
1874 * ":intro": clear screen, display intro screen and wait for return. | |
1875 */ | |
1876 void | |
1877 ex_intro(eap) | |
1876 | 1878 exarg_T *eap UNUSED; |
7 | 1879 { |
1880 screenclear(); | |
1881 intro_message(TRUE); | |
1882 wait_return(TRUE); | |
1883 } |