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