Files
RedBear-OS/tests/wchar/wcstod.c
T
Red Bear OS 1b3e94a20d Red Bear OS relibc baseline
From release 0.1.0 pre-patched archive.
This includes all Red Bear modifications previously maintained
as patches in local/patches/relibc/.
2026-06-27 09:19:26 +03:00

21 lines
430 B
C

#include <sys/types.h>
#include <wchar.h>
// TODO: remove glibc?
#ifdef __GLIBC__
#include <stdio.h>
#endif
void attempt(wchar_t *s) {
wchar_t *end;
double result = wcstod(s, &end);
printf("strtod(%lls) = (%f, %lls)\n", s, result, end);
}
int main() {
attempt(L"1.2345wowzah");
attempt(L"53");
attempt(L"-254352.5...");
attempt(L" 19.2 wat");
attempt(L"365.24 29.53");
attempt(L" 29.53");
}