comparison src/option.c @ 8212:05b88224cea1 v7.4.1399

commit https://github.com/vim/vim/commit/48e330aff911be1c798c88a973af6437a8141fce Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 23 14:53:34 2016 +0100 patch 7.4.1399 Problem: The MS-DOS code does not build. Solution: Remove the old MS-DOS code.
author Christian Brabandt <cb@256bit.org>
date Tue, 23 Feb 2016 15:00:08 +0100
parents 95d59081580f
children 2f57bbe870ea
comparison
equal deleted inserted replaced
8211:6116980b4cfa 8212:05b88224cea1
153 #endif 153 #endif
154 #define PV_RO OPT_BUF(BV_RO) 154 #define PV_RO OPT_BUF(BV_RO)
155 #ifdef FEAT_SMARTINDENT 155 #ifdef FEAT_SMARTINDENT
156 # define PV_SI OPT_BUF(BV_SI) 156 # define PV_SI OPT_BUF(BV_SI)
157 #endif 157 #endif
158 #ifndef SHORT_FNAME 158 #define PV_SN OPT_BUF(BV_SN)
159 # define PV_SN OPT_BUF(BV_SN)
160 #endif
161 #ifdef FEAT_SYN_HL 159 #ifdef FEAT_SYN_HL
162 # define PV_SMC OPT_BUF(BV_SMC) 160 # define PV_SMC OPT_BUF(BV_SMC)
163 # define PV_SYN OPT_BUF(BV_SYN) 161 # define PV_SYN OPT_BUF(BV_SYN)
164 #endif 162 #endif
165 #ifdef FEAT_SPELL 163 #ifdef FEAT_SPELL
350 #endif 348 #endif
351 static int p_ro; 349 static int p_ro;
352 #ifdef FEAT_SMARTINDENT 350 #ifdef FEAT_SMARTINDENT
353 static int p_si; 351 static int p_si;
354 #endif 352 #endif
355 #ifndef SHORT_FNAME
356 static int p_sn; 353 static int p_sn;
357 #endif
358 static long p_sts; 354 static long p_sts;
359 #if defined(FEAT_SEARCHPATH) 355 #if defined(FEAT_SEARCHPATH)
360 static char_u *p_sua; 356 static char_u *p_sua;
361 #endif 357 #endif
362 static long p_sw; 358 static long p_sw;
462 458
463 #define ISK_LATIN1 (char_u *)"@,48-57,_,192-255" 459 #define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
464 460
465 /* 'isprint' for latin1 is also used for MS-Windows cp1252, where 0x80 is used 461 /* 'isprint' for latin1 is also used for MS-Windows cp1252, where 0x80 is used
466 * for the currency sign. */ 462 * for the currency sign. */
467 #if defined(MSDOS) || defined(MSWIN) 463 #if defined(MSWIN)
468 # define ISP_LATIN1 (char_u *)"@,~-255" 464 # define ISP_LATIN1 (char_u *)"@,~-255"
469 #else 465 #else
470 # define ISP_LATIN1 (char_u *)"@,161-255" 466 # define ISP_LATIN1 (char_u *)"@,161-255"
471 #endif 467 #endif
472 468
495 (char_u *)&p_aleph, PV_NONE, 491 (char_u *)&p_aleph, PV_NONE,
496 #else 492 #else
497 (char_u *)NULL, PV_NONE, 493 (char_u *)NULL, PV_NONE,
498 #endif 494 #endif
499 { 495 {
500 #if (defined(MSDOS) || defined(WIN3264)) && !defined(FEAT_GUI_W32) 496 #if (defined(WIN3264)) && !defined(FEAT_GUI_W32)
501 (char_u *)128L, 497 (char_u *)128L,
502 #else 498 #else
503 (char_u *)224L, 499 (char_u *)224L,
504 #endif 500 #endif
505 (char_u *)0L} SCRIPTID_INIT}, 501 (char_u *)0L} SCRIPTID_INIT},
570 (char_u *)&p_awa, PV_NONE, 566 (char_u *)&p_awa, PV_NONE,
571 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 567 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
572 {"background", "bg", P_STRING|P_VI_DEF|P_RCLR, 568 {"background", "bg", P_STRING|P_VI_DEF|P_RCLR,
573 (char_u *)&p_bg, PV_NONE, 569 (char_u *)&p_bg, PV_NONE,
574 { 570 {
575 #if (defined(MSDOS) || defined(WIN3264)) && !defined(FEAT_GUI) 571 #if (defined(WIN3264)) && !defined(FEAT_GUI)
576 (char_u *)"dark", 572 (char_u *)"dark",
577 #else 573 #else
578 (char_u *)"light", 574 (char_u *)"light",
579 #endif 575 #endif
580 (char_u *)0L} SCRIPTID_INIT}, 576 (char_u *)0L} SCRIPTID_INIT},
635 {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, 631 {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
636 {"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT, 632 {"binary", "bin", P_BOOL|P_VI_DEF|P_RSTAT,
637 (char_u *)&p_bin, PV_BIN, 633 (char_u *)&p_bin, PV_BIN,
638 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 634 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
639 {"bioskey", "biosk",P_BOOL|P_VI_DEF, 635 {"bioskey", "biosk",P_BOOL|P_VI_DEF,
640 #ifdef MSDOS 636 (char_u *)NULL, PV_NONE,
641 (char_u *)&p_biosk, PV_NONE,
642 #else
643 (char_u *)NULL, PV_NONE,
644 #endif
645 {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, 637 {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
646 {"bomb", NULL, P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT, 638 {"bomb", NULL, P_BOOL|P_NO_MKRC|P_VI_DEF|P_RSTAT,
647 #ifdef FEAT_MBYTE 639 #ifdef FEAT_MBYTE
648 (char_u *)&p_bomb, PV_BOMB, 640 (char_u *)&p_bomb, PV_BOMB,
649 #else 641 #else
887 #else 879 #else
888 (char_u *)NULL, PV_NONE, 880 (char_u *)NULL, PV_NONE,
889 #endif 881 #endif
890 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 882 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
891 {"conskey", "consk",P_BOOL|P_VI_DEF, 883 {"conskey", "consk",P_BOOL|P_VI_DEF,
892 #ifdef MSDOS 884 (char_u *)NULL, PV_NONE,
893 (char_u *)&p_consk, PV_NONE,
894 #else
895 (char_u *)NULL, PV_NONE,
896 #endif
897 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 885 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
898 {"copyindent", "ci", P_BOOL|P_VI_DEF|P_VIM, 886 {"copyindent", "ci", P_BOOL|P_VI_DEF|P_VIM,
899 (char_u *)&p_ci, PV_CI, 887 (char_u *)&p_ci, PV_CI,
900 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 888 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
901 {"cpoptions", "cpo", P_STRING|P_VIM|P_RALL|P_FLAGLIST, 889 {"cpoptions", "cpo", P_STRING|P_VIM|P_RALL|P_FLAGLIST,
1315 #ifdef CURSOR_SHAPE 1303 #ifdef CURSOR_SHAPE
1316 (char_u *)&p_guicursor, PV_NONE, 1304 (char_u *)&p_guicursor, PV_NONE,
1317 { 1305 {
1318 # ifdef FEAT_GUI 1306 # ifdef FEAT_GUI
1319 (char_u *)"n-v-c:block-Cursor/lCursor,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor,sm:block-Cursor-blinkwait175-blinkoff150-blinkon175", 1307 (char_u *)"n-v-c:block-Cursor/lCursor,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor,sm:block-Cursor-blinkwait175-blinkoff150-blinkon175",
1320 # else /* MSDOS or Win32 console */ 1308 # else /* Win32 console */
1321 (char_u *)"n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30,sm:block", 1309 (char_u *)"n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30,sm:block",
1322 # endif 1310 # endif
1323 (char_u *)0L} 1311 (char_u *)0L}
1324 #else 1312 #else
1325 (char_u *)NULL, PV_NONE, 1313 (char_u *)NULL, PV_NONE,
1594 #endif 1582 #endif
1595 (char_u *)0L} SCRIPTID_INIT}, 1583 (char_u *)0L} SCRIPTID_INIT},
1596 {"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP, 1584 {"isident", "isi", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
1597 (char_u *)&p_isi, PV_NONE, 1585 (char_u *)&p_isi, PV_NONE,
1598 { 1586 {
1599 #if defined(MSDOS) || defined(MSWIN) 1587 #if defined(MSWIN)
1600 (char_u *)"@,48-57,_,128-167,224-235", 1588 (char_u *)"@,48-57,_,128-167,224-235",
1601 #else 1589 #else
1602 # ifdef EBCDIC 1590 # ifdef EBCDIC
1603 /* TODO: EBCDIC Check this! @ == isalpha()*/ 1591 /* TODO: EBCDIC Check this! @ == isalpha()*/
1604 (char_u *)"@,240-249,_,66-73,81-89,98-105," 1592 (char_u *)"@,240-249,_,66-73,81-89,98-105,"
1620 "112-120,128,140-142,156,158,172," 1608 "112-120,128,140-142,156,158,172,"
1621 "174,186,191,203-207,219-225,235-239," 1609 "174,186,191,203-207,219-225,235-239,"
1622 "251-254", 1610 "251-254",
1623 #else 1611 #else
1624 (char_u *)"@,48-57,_", 1612 (char_u *)"@,48-57,_",
1625 # if defined(MSDOS) || defined(MSWIN) 1613 # if defined(MSWIN)
1626 (char_u *)"@,48-57,_,128-167,224-235" 1614 (char_u *)"@,48-57,_,128-167,224-235"
1627 # else 1615 # else
1628 ISK_LATIN1 1616 ISK_LATIN1
1629 # endif 1617 # endif
1630 #endif 1618 #endif
1631 } SCRIPTID_INIT}, 1619 } SCRIPTID_INIT},
1632 {"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP, 1620 {"isprint", "isp", P_STRING|P_VI_DEF|P_RALL|P_COMMA|P_NODUP,
1633 (char_u *)&p_isp, PV_NONE, 1621 (char_u *)&p_isp, PV_NONE,
1634 { 1622 {
1635 #if defined(MSDOS) || defined(MSWIN) \ 1623 #if defined(MSWIN) || (defined(MACOS) && !defined(MACOS_X)) \
1636 || (defined(MACOS) && !defined(MACOS_X)) \
1637 || defined(VMS) 1624 || defined(VMS)
1638 (char_u *)"@,~-255", 1625 (char_u *)"@,~-255",
1639 #else 1626 #else
1640 # ifdef EBCDIC 1627 # ifdef EBCDIC
1641 /* all chars above 63 are printable */ 1628 /* all chars above 63 are printable */
1670 (char_u *)&p_km, PV_NONE, 1657 (char_u *)&p_km, PV_NONE,
1671 {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, 1658 {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
1672 {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE, 1659 {"keywordprg", "kp", P_STRING|P_EXPAND|P_VI_DEF|P_SECURE,
1673 (char_u *)&p_kp, PV_KP, 1660 (char_u *)&p_kp, PV_KP,
1674 { 1661 {
1675 #if defined(MSDOS) || defined(MSWIN) 1662 #if defined(MSWIN)
1676 (char_u *)":help", 1663 (char_u *)":help",
1677 #else 1664 #else
1678 #ifdef VMS 1665 # ifdef VMS
1679 (char_u *)"help", 1666 (char_u *)"help",
1680 #else 1667 # else
1681 # ifdef USEMAN_S 1668 # ifdef USEMAN_S
1682 (char_u *)"man -s", 1669 (char_u *)"man -s",
1683 # else 1670 # else
1684 (char_u *)"man", 1671 (char_u *)"man",
1672 # endif
1685 # endif 1673 # endif
1686 #endif
1687 #endif 1674 #endif
1688 (char_u *)0L} SCRIPTID_INIT}, 1675 (char_u *)0L} SCRIPTID_INIT},
1689 {"langmap", "lmap", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_SECURE, 1676 {"langmap", "lmap", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP|P_SECURE,
1690 #ifdef FEAT_LANGMAP 1677 #ifdef FEAT_LANGMAP
1691 (char_u *)&p_langmap, PV_NONE, 1678 (char_u *)&p_langmap, PV_NONE,
1727 #endif 1714 #endif
1728 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 1715 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
1729 {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR, 1716 {"lines", NULL, P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
1730 (char_u *)&Rows, PV_NONE, 1717 (char_u *)&Rows, PV_NONE,
1731 { 1718 {
1732 #if defined(MSDOS) || defined(WIN3264) 1719 #if defined(WIN3264)
1733 (char_u *)25L, 1720 (char_u *)25L,
1734 #else 1721 #else
1735 (char_u *)24L, 1722 (char_u *)24L,
1736 #endif 1723 #endif
1737 (char_u *)0L} SCRIPTID_INIT}, 1724 (char_u *)0L} SCRIPTID_INIT},
1878 (char_u *)&p_more, PV_NONE, 1865 (char_u *)&p_more, PV_NONE,
1879 {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT}, 1866 {(char_u *)FALSE, (char_u *)TRUE} SCRIPTID_INIT},
1880 {"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST, 1867 {"mouse", NULL, P_STRING|P_VI_DEF|P_FLAGLIST,
1881 (char_u *)&p_mouse, PV_NONE, 1868 (char_u *)&p_mouse, PV_NONE,
1882 { 1869 {
1883 #if defined(MSDOS) || defined(WIN3264) 1870 #if defined(WIN3264)
1884 (char_u *)"a", 1871 (char_u *)"a",
1885 #else 1872 #else
1886 (char_u *)"", 1873 (char_u *)"",
1887 #endif 1874 #endif
1888 (char_u *)0L} SCRIPTID_INIT}, 1875 (char_u *)0L} SCRIPTID_INIT},
1901 #endif 1888 #endif
1902 {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT}, 1889 {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
1903 {"mousemodel", "mousem", P_STRING|P_VI_DEF, 1890 {"mousemodel", "mousem", P_STRING|P_VI_DEF,
1904 (char_u *)&p_mousem, PV_NONE, 1891 (char_u *)&p_mousem, PV_NONE,
1905 { 1892 {
1906 #if defined(MSDOS) || defined(MSWIN) 1893 #if defined(MSWIN)
1907 (char_u *)"popup", 1894 (char_u *)"popup",
1908 #else 1895 #else
1909 # if defined(MACOS) 1896 # if defined(MACOS)
1910 (char_u *)"popup_setpos", 1897 (char_u *)"popup_setpos",
1911 # else 1898 # else
1960 SCRIPTID_INIT}, 1947 SCRIPTID_INIT},
1961 {"open", NULL, P_BOOL|P_VI_DEF, 1948 {"open", NULL, P_BOOL|P_VI_DEF,
1962 (char_u *)NULL, PV_NONE, 1949 (char_u *)NULL, PV_NONE,
1963 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 1950 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
1964 {"opendevice", "odev", P_BOOL|P_VI_DEF, 1951 {"opendevice", "odev", P_BOOL|P_VI_DEF,
1965 #if defined(MSDOS) || defined(MSWIN) 1952 #if defined(MSWIN)
1966 (char_u *)&p_odev, PV_NONE, 1953 (char_u *)&p_odev, PV_NONE,
1967 #else 1954 #else
1968 (char_u *)NULL, PV_NONE, 1955 (char_u *)NULL, PV_NONE,
1969 #endif 1956 #endif
1970 {(char_u *)FALSE, (char_u *)FALSE} 1957 {(char_u *)FALSE, (char_u *)FALSE}
2006 (char_u *)&p_pm, PV_NONE, 1993 (char_u *)&p_pm, PV_NONE,
2007 {(char_u *)"", (char_u *)0L} SCRIPTID_INIT}, 1994 {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
2008 {"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP, 1995 {"path", "pa", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
2009 (char_u *)&p_path, PV_PATH, 1996 (char_u *)&p_path, PV_PATH,
2010 { 1997 {
2011 #if defined AMIGA || defined MSDOS || defined MSWIN 1998 #if defined(AMIGA) || defined(MSWIN)
2012 (char_u *)".,,", 1999 (char_u *)".,,",
2013 #else 2000 #else
2014 # if defined(__EMX__) 2001 # if defined(__EMX__)
2015 (char_u *)".,/emx/include,,", 2002 (char_u *)".,/emx/include,,",
2016 # else /* Unix, probably */ 2003 # else /* Unix, probably */
2292 (char_u *)&p_sh, PV_NONE, 2279 (char_u *)&p_sh, PV_NONE,
2293 { 2280 {
2294 #ifdef VMS 2281 #ifdef VMS
2295 (char_u *)"-", 2282 (char_u *)"-",
2296 #else 2283 #else
2297 # if defined(MSDOS) 2284 # if defined(WIN3264)
2298 (char_u *)"command", 2285 (char_u *)"", /* set in set_init_1() */
2299 # else 2286 # else
2300 # if defined(WIN3264)
2301 (char_u *)"", /* set in set_init_1() */
2302 # else
2303 (char_u *)"sh", 2287 (char_u *)"sh",
2304 # endif
2305 # endif 2288 # endif
2306 #endif /* VMS */ 2289 #endif /* VMS */
2307 (char_u *)0L} SCRIPTID_INIT}, 2290 (char_u *)0L} SCRIPTID_INIT},
2308 {"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE, 2291 {"shellcmdflag","shcf", P_STRING|P_VI_DEF|P_SECURE,
2309 (char_u *)&p_shcf, PV_NONE, 2292 (char_u *)&p_shcf, PV_NONE,
2310 { 2293 {
2311 #if defined(MSDOS) || defined(MSWIN) 2294 #if defined(MSWIN)
2312 (char_u *)"/c", 2295 (char_u *)"/c",
2313 #else 2296 #else
2314 (char_u *)"-c", 2297 (char_u *)"-c",
2315 #endif 2298 #endif
2316 (char_u *)0L} SCRIPTID_INIT}, 2299 (char_u *)0L} SCRIPTID_INIT},
2362 #endif 2345 #endif
2363 (char_u *)0L} SCRIPTID_INIT}, 2346 (char_u *)0L} SCRIPTID_INIT},
2364 {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE, 2347 {"shellxescape", "sxe", P_STRING|P_VI_DEF|P_SECURE,
2365 (char_u *)&p_sxe, PV_NONE, 2348 (char_u *)&p_sxe, PV_NONE,
2366 { 2349 {
2367 #if defined(MSDOS) || defined(WIN3264) 2350 #if defined(WIN3264)
2368 (char_u *)"\"&|<>()@^", 2351 (char_u *)"\"&|<>()@^",
2369 #else 2352 #else
2370 (char_u *)"", 2353 (char_u *)"",
2371 #endif 2354 #endif
2372 (char_u *)0L} SCRIPTID_INIT}, 2355 (char_u *)0L} SCRIPTID_INIT},
2379 {"shortmess", "shm", P_STRING|P_VIM|P_FLAGLIST, 2362 {"shortmess", "shm", P_STRING|P_VIM|P_FLAGLIST,
2380 (char_u *)&p_shm, PV_NONE, 2363 (char_u *)&p_shm, PV_NONE,
2381 {(char_u *)"", (char_u *)"filnxtToO"} 2364 {(char_u *)"", (char_u *)"filnxtToO"}
2382 SCRIPTID_INIT}, 2365 SCRIPTID_INIT},
2383 {"shortname", "sn", P_BOOL|P_VI_DEF, 2366 {"shortname", "sn", P_BOOL|P_VI_DEF,
2384 #ifdef SHORT_FNAME
2385 (char_u *)NULL, PV_NONE,
2386 #else
2387 (char_u *)&p_sn, PV_SN, 2367 (char_u *)&p_sn, PV_SN,
2388 #endif
2389 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, 2368 {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
2390 {"showbreak", "sbr", P_STRING|P_VI_DEF|P_RALL, 2369 {"showbreak", "sbr", P_STRING|P_VI_DEF|P_RALL,
2391 #ifdef FEAT_LINEBREAK 2370 #ifdef FEAT_LINEBREAK
2392 (char_u *)&p_sbr, PV_NONE, 2371 (char_u *)&p_sbr, PV_NONE,
2393 #else 2372 #else
2793 #endif 2772 #endif
2794 SCRIPTID_INIT}, 2773 SCRIPTID_INIT},
2795 {"viminfo", "vi", P_STRING|P_ONECOMMA|P_NODUP|P_SECURE, 2774 {"viminfo", "vi", P_STRING|P_ONECOMMA|P_NODUP|P_SECURE,
2796 #ifdef FEAT_VIMINFO 2775 #ifdef FEAT_VIMINFO
2797 (char_u *)&p_viminfo, PV_NONE, 2776 (char_u *)&p_viminfo, PV_NONE,
2798 #if defined(MSDOS) || defined(MSWIN) 2777 #if defined(MSWIN)
2799 {(char_u *)"", (char_u *)"'100,<50,s10,h,rA:,rB:"} 2778 {(char_u *)"", (char_u *)"'100,<50,s10,h,rA:,rB:"}
2800 #else 2779 #else
2801 # ifdef AMIGA 2780 # ifdef AMIGA
2802 {(char_u *)"", 2781 {(char_u *)"",
2803 (char_u *)"'100,<50,s10,h,rdf0:,rdf1:,rdf2:"} 2782 (char_u *)"'100,<50,s10,h,rdf0:,rdf1:,rdf2:"}
3185 /* 3164 /*
3186 * Find default value for 'shell' option. 3165 * Find default value for 'shell' option.
3187 * Don't use it if it is empty. 3166 * Don't use it if it is empty.
3188 */ 3167 */
3189 if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL) 3168 if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL)
3190 #if defined(MSDOS) || defined(MSWIN) 3169 #if defined(MSWIN)
3191 # ifdef __EMX__ 3170 # ifdef __EMX__
3192 || ((p = mch_getenv((char_u *)"EMXSHELL")) != NULL && *p != NUL) 3171 || ((p = mch_getenv((char_u *)"EMXSHELL")) != NULL && *p != NUL)
3193 # endif 3172 # endif
3194 || ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL) 3173 || ((p = mch_getenv((char_u *)"COMSPEC")) != NULL && *p != NUL)
3195 # ifdef WIN3264 3174 # ifdef WIN3264
3361 #endif 3340 #endif
3362 3341
3363 #ifdef FEAT_POSTSCRIPT 3342 #ifdef FEAT_POSTSCRIPT
3364 /* 'printexpr' must be allocated to be able to evaluate it. */ 3343 /* 'printexpr' must be allocated to be able to evaluate it. */
3365 set_string_default("pexpr", 3344 set_string_default("pexpr",
3366 # if defined(MSWIN) || defined(MSDOS) 3345 # if defined(MSWIN)
3367 (char_u *)"system('copy' . ' ' . v:fname_in . (&printdevice == '' ? ' LPT1:' : (' \"' . &printdevice . '\"'))) . delete(v:fname_in)" 3346 (char_u *)"system('copy' . ' ' . v:fname_in . (&printdevice == '' ? ' LPT1:' : (' \"' . &printdevice . '\"'))) . delete(v:fname_in)"
3368 # else 3347 # else
3369 # ifdef VMS 3348 # ifdef VMS
3370 (char_u *)"system('print/delete' . (&printdevice == '' ? '' : ' /queue=' . &printdevice) . ' ' . v:fname_in)" 3349 (char_u *)"system('print/delete' . (&printdevice == '' ? '' : ' /queue=' . &printdevice) . ' ' . v:fname_in)"
3371 3350
3511 { 3490 {
3512 options[opt_idx].def_val[VI_DEFAULT] = p_enc; 3491 options[opt_idx].def_val[VI_DEFAULT] = p_enc;
3513 options[opt_idx].flags |= P_DEF_ALLOCED; 3492 options[opt_idx].flags |= P_DEF_ALLOCED;
3514 } 3493 }
3515 3494
3516 #if defined(MSDOS) || defined(MSWIN) || defined(MACOS) \ 3495 #if defined(MSWIN) || defined(MACOS) || defined(VMS)
3517 || defined(VMS)
3518 if (STRCMP(p_enc, "latin1") == 0 3496 if (STRCMP(p_enc, "latin1") == 0
3519 # ifdef FEAT_MBYTE 3497 # ifdef FEAT_MBYTE
3520 || enc_utf8 3498 || enc_utf8
3521 # endif 3499 # endif
3522 ) 3500 )
3791 if (!option_was_set((char_u *)"window")) 3769 if (!option_was_set((char_u *)"window"))
3792 p_window = Rows - 1; 3770 p_window = Rows - 1;
3793 set_number_default("window", Rows - 1); 3771 set_number_default("window", Rows - 1);
3794 3772
3795 /* For DOS console the default is always black. */ 3773 /* For DOS console the default is always black. */
3796 #if !((defined(MSDOS) || defined(WIN3264)) && !defined(FEAT_GUI)) 3774 #if !((defined(WIN3264)) && !defined(FEAT_GUI))
3797 /* 3775 /*
3798 * If 'background' wasn't set by the user, try guessing the value, 3776 * If 'background' wasn't set by the user, try guessing the value,
3799 * depending on the terminal name. Only need to check for terminals 3777 * depending on the terminal name. Only need to check for terminals
3800 * with a dark background, that can handle color. 3778 * with a dark background, that can handle color.
3801 */ 3779 */
3834 * case. If this value is 0-6 or 8, our background is dark. 3812 * case. If this value is 0-6 or 8, our background is dark.
3835 */ 3813 */
3836 static char_u * 3814 static char_u *
3837 term_bg_default(void) 3815 term_bg_default(void)
3838 { 3816 {
3839 #if defined(MSDOS) || defined(WIN3264) 3817 #if defined(WIN3264)
3840 /* DOS console nearly always black */ 3818 /* DOS console nearly always black */
3841 return (char_u *)"dark"; 3819 return (char_u *)"dark";
3842 #else 3820 #else
3843 char_u *p; 3821 char_u *p;
3844 3822
3961 } 3939 }
3962 vim_free(p); 3940 vim_free(p);
3963 } 3941 }
3964 #endif 3942 #endif
3965 3943
3966 #if defined(MSDOS) || defined(WIN3264) 3944 #if defined(WIN3264)
3967 /* 3945 /*
3968 * Set 'shellcmdflag', 'shellxquote', and 'shellquote' depending on the 3946 * Set 'shellcmdflag', 'shellxquote', and 'shellquote' depending on the
3969 * 'shell' option. 3947 * 'shell' option.
3970 * This is done after other initializations, where 'shell' might have been 3948 * This is done after other initializations, where 'shell' might have been
3971 * set, but only if they have not been set before. Default for p_shcf is 3949 * set, but only if they have not been set before. Default for p_shcf is
3972 * "/c", for p_shq is "". For "sh" like shells it is changed here to 3950 * "/c", for p_shq is "". For "sh" like shells it is changed here to
3973 * "-c" and "\"", but not for DJGPP, because it starts the shell without 3951 * "-c" and "\"". And for Win32 we need to set p_sxq instead.
3974 * command.com. And for Win32 we need to set p_sxq instead.
3975 */ 3952 */
3976 if (strstr((char *)gettail(p_sh), "sh") != NULL) 3953 if (strstr((char *)gettail(p_sh), "sh") != NULL)
3977 { 3954 {
3978 int idx3; 3955 int idx3;
3979 3956
3982 { 3959 {
3983 p_shcf = (char_u *)"-c"; 3960 p_shcf = (char_u *)"-c";
3984 options[idx3].def_val[VI_DEFAULT] = p_shcf; 3961 options[idx3].def_val[VI_DEFAULT] = p_shcf;
3985 } 3962 }
3986 3963
3987 # ifndef DJGPP 3964 # ifdef WIN3264
3988 # ifdef WIN3264
3989 /* Somehow Win32 requires the quotes around the redirection too */ 3965 /* Somehow Win32 requires the quotes around the redirection too */
3990 idx3 = findoption((char_u *)"sxq"); 3966 idx3 = findoption((char_u *)"sxq");
3991 if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET)) 3967 if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET))
3992 { 3968 {
3993 p_sxq = (char_u *)"\""; 3969 p_sxq = (char_u *)"\"";
3994 options[idx3].def_val[VI_DEFAULT] = p_sxq; 3970 options[idx3].def_val[VI_DEFAULT] = p_sxq;
3995 } 3971 }
3996 # else 3972 # else
3997 idx3 = findoption((char_u *)"shq"); 3973 idx3 = findoption((char_u *)"shq");
3998 if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET)) 3974 if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET))
3999 { 3975 {
4000 p_shq = (char_u *)"\""; 3976 p_shq = (char_u *)"\"";
4001 options[idx3].def_val[VI_DEFAULT] = p_shq; 3977 options[idx3].def_val[VI_DEFAULT] = p_shq;
4002 } 3978 }
4003 # endif
4004 # endif 3979 # endif
4005 } 3980 }
4006 else if (strstr((char *)gettail(p_sh), "cmd.exe") != NULL) 3981 else if (strstr((char *)gettail(p_sh), "cmd.exe") != NULL)
4007 { 3982 {
4008 int idx3; 3983 int idx3;
4422 goto skip; 4397 goto skip;
4423 } 4398 }
4424 } 4399 }
4425 4400
4426 /* 4401 /*
4427 * allow '=' and ':' as MSDOS command.com allows only one 4402 * allow '=' and ':' for hystorical reasons (MSDOS command.com
4428 * '=' character per "set" command line. grrr. (jw) 4403 * allows only one '=' character per "set" command line. grrr. (jw)
4429 */ 4404 */
4430 if (nextchar == '?' 4405 if (nextchar == '?'
4431 || (prefix == 1 4406 || (prefix == 1
4432 && vim_strchr((char_u *)"=:&<", nextchar) == NULL 4407 && vim_strchr((char_u *)"=:&<", nextchar) == NULL
4433 && !(flags & P_BOOL))) 4408 && !(flags & P_BOOL)))
6556 ttest(FALSE); 6531 ttest(FALSE);
6557 if (varp == &T_ME) 6532 if (varp == &T_ME)
6558 { 6533 {
6559 out_str(T_ME); 6534 out_str(T_ME);
6560 redraw_later(CLEAR); 6535 redraw_later(CLEAR);
6561 #if defined(MSDOS) || (defined(WIN3264) && !defined(FEAT_GUI_W32)) 6536 #if defined(WIN3264) && !defined(FEAT_GUI_W32)
6562 /* Since t_me has been set, this probably means that the user 6537 /* Since t_me has been set, this probably means that the user
6563 * wants to use this as default colors. Need to reset default 6538 * wants to use this as default colors. Need to reset default
6564 * background/foreground colors. */ 6539 * background/foreground colors. */
6565 mch_set_normal_colors(); 6540 mch_set_normal_colors();
6566 #endif 6541 #endif
8792 } 8767 }
8793 Columns = MIN_COLUMNS; 8768 Columns = MIN_COLUMNS;
8794 } 8769 }
8795 limit_screen_size(); 8770 limit_screen_size();
8796 8771
8797 #ifdef DJGPP
8798 /* avoid a crash by checking for a too large value of 'columns' */
8799 if (old_Columns != Columns && full_screen && term_console)
8800 mch_check_columns();
8801 #endif
8802
8803 /* 8772 /*
8804 * If the screen (shell) height has been changed, assume it is the 8773 * If the screen (shell) height has been changed, assume it is the
8805 * physical screenheight. 8774 * physical screenheight.
8806 */ 8775 */
8807 if (old_Rows != Rows || old_Columns != Columns) 8776 if (old_Rows != Rows || old_Columns != Columns)
10387 #endif 10356 #endif
10388 case PV_RO: return (char_u *)&(curbuf->b_p_ro); 10357 case PV_RO: return (char_u *)&(curbuf->b_p_ro);
10389 #ifdef FEAT_SMARTINDENT 10358 #ifdef FEAT_SMARTINDENT
10390 case PV_SI: return (char_u *)&(curbuf->b_p_si); 10359 case PV_SI: return (char_u *)&(curbuf->b_p_si);
10391 #endif 10360 #endif
10392 #ifndef SHORT_FNAME
10393 case PV_SN: return (char_u *)&(curbuf->b_p_sn); 10361 case PV_SN: return (char_u *)&(curbuf->b_p_sn);
10394 #endif
10395 case PV_STS: return (char_u *)&(curbuf->b_p_sts); 10362 case PV_STS: return (char_u *)&(curbuf->b_p_sts);
10396 #ifdef FEAT_SEARCHPATH 10363 #ifdef FEAT_SEARCHPATH
10397 case PV_SUA: return (char_u *)&(curbuf->b_p_sua); 10364 case PV_SUA: return (char_u *)&(curbuf->b_p_sua);
10398 #endif 10365 #endif
10399 case PV_SWF: return (char_u *)&(curbuf->b_p_swf); 10366 case PV_SWF: return (char_u *)&(curbuf->b_p_swf);
10720 buf->b_p_cfu = vim_strsave(p_cfu); 10687 buf->b_p_cfu = vim_strsave(p_cfu);
10721 buf->b_p_ofu = vim_strsave(p_ofu); 10688 buf->b_p_ofu = vim_strsave(p_ofu);
10722 #endif 10689 #endif
10723 buf->b_p_sts = p_sts; 10690 buf->b_p_sts = p_sts;
10724 buf->b_p_sts_nopaste = p_sts_nopaste; 10691 buf->b_p_sts_nopaste = p_sts_nopaste;
10725 #ifndef SHORT_FNAME
10726 buf->b_p_sn = p_sn; 10692 buf->b_p_sn = p_sn;
10727 #endif
10728 #ifdef FEAT_COMMENTS 10693 #ifdef FEAT_COMMENTS
10729 buf->b_p_com = vim_strsave(p_com); 10694 buf->b_p_com = vim_strsave(p_com);
10730 #endif 10695 #endif
10731 #ifdef FEAT_FOLDING 10696 #ifdef FEAT_FOLDING
10732 buf->b_p_cms = vim_strsave(p_cms); 10697 buf->b_p_cms = vim_strsave(p_cms);