2019-08-17 17:09:43 -04:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
2010-01-06 15:27:04 -05:00
|
|
|
#include <locale.h>
|
2019-08-09 12:00:17 -04:00
|
|
|
#include <math.h>
|
2019-08-26 15:12:15 -04:00
|
|
|
#include <setjmp.h>
|
2019-08-09 12:00:17 -04:00
|
|
|
#include <stdarg.h>
|
2019-08-09 16:31:21 -04:00
|
|
|
#include <stdint.h>
|
2019-08-09 12:00:17 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2019-08-26 15:12:15 -04:00
|
|
|
#include "scheme.h"
|
2010-01-06 15:27:04 -05:00
|
|
|
|
|
|
|
double D_PNAN;
|
|
|
|
double D_NNAN;
|
|
|
|
double D_PINF;
|
|
|
|
double D_NINF;
|
2019-08-09 07:02:02 -04:00
|
|
|
float F_PNAN;
|
|
|
|
float F_NNAN;
|
|
|
|
float F_PINF;
|
|
|
|
float F_NINF;
|
2010-01-06 15:27:04 -05:00
|
|
|
|
|
|
|
int locale_is_utf8;
|
|
|
|
|
2019-08-21 15:11:05 -04:00
|
|
|
#ifdef __WATCOMC__
|
|
|
|
static float purkka(const char *s, char **dummy) { return strtod(s, dummy); }
|
|
|
|
#define strtof purkka
|
|
|
|
#endif
|
|
|
|
|
2010-01-06 15:27:04 -05:00
|
|
|
void llt_init()
|
|
|
|
{
|
|
|
|
locale_is_utf8 = u8_is_locale_utf8(setlocale(LC_ALL, ""));
|
|
|
|
|
|
|
|
randomize();
|
|
|
|
|
|
|
|
ios_init_stdstreams();
|
|
|
|
|
2019-08-09 07:02:02 -04:00
|
|
|
D_PNAN = strtod("+NaN", NULL);
|
|
|
|
D_NNAN = -strtod("+NaN", NULL);
|
|
|
|
D_PINF = strtod("+Inf", NULL);
|
|
|
|
D_NINF = strtod("-Inf", NULL);
|
2019-08-21 15:11:05 -04:00
|
|
|
|
2019-08-09 07:02:02 -04:00
|
|
|
F_PNAN = strtof("+NaN", NULL);
|
|
|
|
F_NNAN = -strtof("+NaN", NULL);
|
|
|
|
F_PINF = strtof("+Inf", NULL);
|
|
|
|
F_NINF = strtof("-Inf", NULL);
|
2010-01-06 15:27:04 -05:00
|
|
|
}
|