mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 17:58:18 +00:00
Merge #814 'Remove dead #ifdefed code'
This commit is contained in:
@@ -1933,26 +1933,15 @@ void set_init_1(void)
|
||||
*/
|
||||
opt_idx = findoption((char_u *)"maxmemtot");
|
||||
if (opt_idx >= 0) {
|
||||
#ifndef HAVE_TOTAL_MEM
|
||||
if (options[opt_idx].def_val[VI_DEFAULT] == (char_u *)0L)
|
||||
#endif
|
||||
{
|
||||
#ifdef HAVE_TOTAL_MEM
|
||||
/* Use half of amount of memory available to Vim. */
|
||||
/* If too much to fit in long_u, get long_u max */
|
||||
uint64_t available_kib = os_get_total_mem_kib();
|
||||
n = available_kib / 2 > ULONG_MAX ? ULONG_MAX
|
||||
: (long_u)(available_kib /2);
|
||||
#else
|
||||
n = (0x7fffffff >> 11);
|
||||
#endif
|
||||
options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n;
|
||||
opt_idx = findoption((char_u *)"maxmem");
|
||||
if (opt_idx >= 0) {
|
||||
#ifndef HAVE_TOTAL_MEM
|
||||
if ((long)options[opt_idx].def_val[VI_DEFAULT] > (long)n
|
||||
|| (long)options[opt_idx].def_val[VI_DEFAULT] == 0L)
|
||||
#endif
|
||||
options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n;
|
||||
}
|
||||
}
|
||||
@@ -1995,7 +1984,7 @@ void set_init_1(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(MSWIN) || defined(EBCDIC) || defined(MAC)
|
||||
#if defined(MSWIN) || defined(MAC)
|
||||
/* Set print encoding on platforms that don't default to latin1 */
|
||||
set_string_default("penc",
|
||||
(char_u *)"hp-roman8"
|
||||
|
Reference in New Issue
Block a user