First import of dmd-2.065-b1 (7088593).

The CPP mangling is not integrated yet.
This commit is contained in:
Kai Nacke
2013-12-06 16:59:41 +01:00
parent 2fa997e6ad
commit 1de68a45b8
78 changed files with 3480 additions and 4561 deletions

View File

@@ -520,6 +520,16 @@ int ld_type(longdouble x)
size_t ld_sprint(char* str, int fmt, longdouble x)
{
// ensure dmc compatible strings for nan and inf
switch(ld_type(x))
{
case LD_TYPE_QNAN:
case LD_TYPE_SNAN:
return sprintf(str, "nan");
case LD_TYPE_INFINITE:
return sprintf(str, x.sign ? "-inf" : "inf");
}
// fmt is 'a','A','f' or 'g'
if(fmt != 'a' && fmt != 'A')
{
@@ -537,16 +547,8 @@ size_t ld_sprint(char* str, int fmt, longdouble x)
unsigned short exp = x.exponent;
unsigned long long mantissa = x.mantissa;
switch(ld_type(x))
{
case LD_TYPE_ZERO:
if(ld_type(x) == LD_TYPE_ZERO)
return sprintf(str, "0x0.0L");
case LD_TYPE_QNAN:
case LD_TYPE_SNAN:
return sprintf(str, "NAN");
case LD_TYPE_INFINITE:
return sprintf(str, x.sign ? "-INF" : "INF");
}
size_t len = 0;
if(x.sign)