Differences From Artifact [7e6178bd46]:
- File src/OFString.m — part of check-in [aceaca225d] at 2020-12-31 17:28:47 on branch trunk — Use strtod() if we have no strtof() (user: js, size: 67244) [annotate] [blame] [check-ins using]
To Artifact [3d251eedbb]:
- File
src/OFString.m
— part of check-in
[cd4fd689d6]
at
2021-01-01 22:11:33
on branch trunk
— OFString: Manually handle NaN
strtod() on HP-UX does not accept NaN. (user: js, size: 67572) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 | if ([stripped caseInsensitiveCompare: @"INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"INFINITY"] == OF_ORDERED_SAME) return INFINITY; if ([stripped caseInsensitiveCompare: @"-INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"-INFINITY"] == OF_ORDERED_SAME) return -INFINITY; #ifdef HAVE_STRTOF_L const char *UTF8String = self.UTF8String; #else /* * If we have no strtof_l, we have no other choice but to replace "." * with the locale's decimal point. | > > > > | 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 | if ([stripped caseInsensitiveCompare: @"INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"INFINITY"] == OF_ORDERED_SAME) return INFINITY; if ([stripped caseInsensitiveCompare: @"-INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"-INFINITY"] == OF_ORDERED_SAME) return -INFINITY; if ([stripped caseInsensitiveCompare: @"NAN"] == OF_ORDERED_SAME) return NAN; if ([stripped caseInsensitiveCompare: @"-NAN"] == OF_ORDERED_SAME) return -NAN; #ifdef HAVE_STRTOF_L const char *UTF8String = self.UTF8String; #else /* * If we have no strtof_l, we have no other choice but to replace "." * with the locale's decimal point. |
︙ | ︙ | |||
2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 | if ([stripped caseInsensitiveCompare: @"INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"INFINITY"] == OF_ORDERED_SAME) return INFINITY; if ([stripped caseInsensitiveCompare: @"-INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"-INFINITY"] == OF_ORDERED_SAME) return -INFINITY; #ifdef HAVE_STRTOD_L const char *UTF8String = self.UTF8String; #else /* * If we have no strtod_l, we have no other choice but to replace "." * with the locale's decimal point. | > > > > | 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 | if ([stripped caseInsensitiveCompare: @"INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"INFINITY"] == OF_ORDERED_SAME) return INFINITY; if ([stripped caseInsensitiveCompare: @"-INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"-INFINITY"] == OF_ORDERED_SAME) return -INFINITY; if ([stripped caseInsensitiveCompare: @"NAN"] == OF_ORDERED_SAME) return NAN; if ([stripped caseInsensitiveCompare: @"-NAN"] == OF_ORDERED_SAME) return -NAN; #ifdef HAVE_STRTOD_L const char *UTF8String = self.UTF8String; #else /* * If we have no strtod_l, we have no other choice but to replace "." * with the locale's decimal point. |
︙ | ︙ |