mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.0491: no good reason to build without the float feature
Problem: No good reason to build without the float feature. Solution: Remove configure check for float and "#ifdef FEAT_FLOAT".
This commit is contained in:
@@ -1895,7 +1895,6 @@ tv_str(typval_T *tvs, int *idxp, char_u **tofree)
|
||||
return s;
|
||||
}
|
||||
|
||||
# ifdef FEAT_FLOAT
|
||||
/*
|
||||
* Get float argument from "idxp" entry in "tvs". First entry is 1.
|
||||
*/
|
||||
@@ -1919,11 +1918,9 @@ tv_float(typval_T *tvs, int *idxp)
|
||||
}
|
||||
return f;
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_FLOAT
|
||||
/*
|
||||
* Return the representation of infinity for printf() function:
|
||||
* "-inf", "inf", "+inf", " inf", "-INF", "INF", "+INF" or " INF".
|
||||
@@ -1945,7 +1942,6 @@ infinity_str(int positive,
|
||||
idx += 4;
|
||||
return table[idx];
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This code was included to provide a portable vsnprintf() and snprintf().
|
||||
@@ -2079,13 +2075,9 @@ vim_vsnprintf_typval(
|
||||
char length_modifier = '\0';
|
||||
|
||||
// temporary buffer for simple numeric->string conversion
|
||||
# if defined(FEAT_FLOAT)
|
||||
# define TMP_LEN 350 // On my system 1e308 is the biggest number possible.
|
||||
# define TMP_LEN 350 // On my system 1e308 is the biggest number possible.
|
||||
// That sounds reasonable to use as the maximum
|
||||
// printable.
|
||||
# else
|
||||
# define TMP_LEN 66
|
||||
# endif
|
||||
char tmp[TMP_LEN];
|
||||
|
||||
// string address in case of string argument
|
||||
@@ -2637,7 +2629,6 @@ vim_vsnprintf_typval(
|
||||
break;
|
||||
}
|
||||
|
||||
# ifdef FEAT_FLOAT
|
||||
case 'f':
|
||||
case 'F':
|
||||
case 'e':
|
||||
@@ -2653,9 +2644,9 @@ vim_vsnprintf_typval(
|
||||
int remove_trailing_zeroes = FALSE;
|
||||
|
||||
f =
|
||||
# if defined(FEAT_EVAL)
|
||||
# if defined(FEAT_EVAL)
|
||||
tvs != NULL ? tv_float(tvs, &arg_idx) :
|
||||
# endif
|
||||
# endif
|
||||
va_arg(ap, double);
|
||||
abs_f = f < 0 ? -f : f;
|
||||
|
||||
@@ -2672,11 +2663,11 @@ vim_vsnprintf_typval(
|
||||
}
|
||||
|
||||
if ((fmt_spec == 'f' || fmt_spec == 'F') &&
|
||||
# ifdef VAX
|
||||
# ifdef VAX
|
||||
abs_f > 1.0e38
|
||||
# else
|
||||
# else
|
||||
abs_f > 1.0e307
|
||||
# endif
|
||||
# endif
|
||||
)
|
||||
{
|
||||
// Avoid a buffer overflow
|
||||
@@ -2801,7 +2792,6 @@ vim_vsnprintf_typval(
|
||||
str_arg = tmp;
|
||||
break;
|
||||
}
|
||||
# endif
|
||||
|
||||
default:
|
||||
// unrecognized conversion specifier, keep format string
|
||||
|
Reference in New Issue
Block a user