version 1.9, 2015/04/05 13:56:04 |
version 1.10, 2015/04/05 13:59:26 |
|
|
d1 = bwstod(kv1->k, &empty1); |
d1 = bwstod(kv1->k, &empty1); |
err1 = errno; |
err1 = errno; |
|
|
if (empty1) |
if (empty1) { |
kv1->hint->v.gh.notnum = true; |
kv1->hint->v.gh.notnum = true; |
else if (err1 == 0) { |
kv1->hint->status = HS_INITIALIZED; |
|
} else if (err1 == 0) { |
kv1->hint->v.gh.d = d1; |
kv1->hint->v.gh.d = d1; |
kv1->hint->v.gh.nan = is_nan(d1); |
kv1->hint->v.gh.nan = is_nan(d1); |
kv1->hint->status = HS_INITIALIZED; |
kv1->hint->status = HS_INITIALIZED; |
|
|
d2 = bwstod(kv2->k, &empty2); |
d2 = bwstod(kv2->k, &empty2); |
err2 = errno; |
err2 = errno; |
|
|
if (empty2) |
if (empty2) { |
kv2->hint->v.gh.notnum = true; |
kv2->hint->v.gh.notnum = true; |
else if (err2 == 0) { |
kv2->hint->status = HS_INITIALIZED; |
|
} else if (err2 == 0) { |
kv2->hint->v.gh.d = d2; |
kv2->hint->v.gh.d = d2; |
kv2->hint->v.gh.nan = is_nan(d2); |
kv2->hint->v.gh.nan = is_nan(d2); |
kv2->hint->status = HS_INITIALIZED; |
kv2->hint->status = HS_INITIALIZED; |
|
|
|
|
if (kv1->hint->status == HS_INITIALIZED && |
if (kv1->hint->status == HS_INITIALIZED && |
kv2->hint->status == HS_INITIALIZED) { |
kv2->hint->status == HS_INITIALIZED) { |
|
#ifdef GNUSORT_COMPATIBILITY |
if (kv1->hint->v.gh.notnum) |
if (kv1->hint->v.gh.notnum) |
return kv2->hint->v.gh.notnum ? 0 : -1; |
return kv2->hint->v.gh.notnum ? 0 : -1; |
else if (kv2->hint->v.gh.notnum) |
else if (kv2->hint->v.gh.notnum) |
return 1; |
return 1; |
|
#else |
|
if (kv1->hint->v.gh.notnum && kv2->hint->v.gh.notnum) |
|
return 0; |
|
#endif |
|
|
if (kv1->hint->v.gh.nan) |
if (kv1->hint->v.gh.nan) |
return kv2->hint->v.gh.nan ? |
return kv2->hint->v.gh.nan ? |
|
|
err2 = errno; |
err2 = errno; |
} |
} |
|
|
/* Non-value case: */ |
/* Non-value case */ |
|
#ifdef GNUSORT_COMPATIBILITY |
if (empty1) |
if (empty1) |
return empty2 ? 0 : -1; |
return empty2 ? 0 : -1; |
else if (empty2) |
else if (empty2) |
return 1; |
return 1; |
|
#else |
|
if (empty1 && empty2) |
|
return 0; |
|
#endif |
|
|
/* NAN case */ |
/* NAN case */ |
if (is_nan(d1)) |
if (is_nan(d1)) |