diff --git a/src/c/printer/write_ugly.d b/src/c/printer/write_ugly.d index 24296cf5e..73a6aa3cb 100644 --- a/src/c/printer/write_ugly.d +++ b/src/c/printer/write_ugly.d @@ -413,6 +413,11 @@ static printer dispatch[FREE+1] = { write_float, /* t_longfloat */ #endif write_complex, /* t_complex */ +#ifdef ECL_COMPLEX_FLOAT + write_illegal, /* t_csfloat */ + write_illegal, /* t_cdfloat */ + write_illegal, /* t_clfloat */ +#endif _ecl_write_symbol, /* t_symbol */ write_package, /* t_package */ write_hashtable, /* t_hashtable */ diff --git a/src/h/object.h b/src/h/object.h index 9227408da..f6c2d2841 100644 --- a/src/h/object.h +++ b/src/h/object.h @@ -41,7 +41,7 @@ typedef enum { t_start = 0, t_list = 1, /* The most specific numeric types come first. Assumed by - some routines, like cl_expt */ + some routines, like cl_expt. See ANSI 12.1.1.2. */ t_character = 2, /* immediate character */ t_fixnum = 3, /* immediate fixnum */ t_bignum = 4, @@ -53,6 +53,11 @@ typedef enum { t_longfloat, #endif t_complex, +#ifdef ECL_COMPLEX_FLOAT + t_csfloat, + t_cdfloat, + t_clfloat, +#endif t_symbol, t_package, t_hashtable, @@ -231,6 +236,26 @@ struct ecl_complex { cl_object imag; /* imaginary part, must be a number */ }; +#ifdef ECL_COMPLEX_FLOAT +struct ecl_csfloat { + _ECL_HDR; + float _Complex value; +}; +#define ecl_csfloat(o) ((o)->csfloat.value) + +struct ecl_cdfloat { + _ECL_HDR; + double _Complex value; +}; +#define ecl_cdfloat(o) ((o)->cdfloat.value) + +struct ecl_clfloat { + _ECL_HDR; + long double _Complex value; +}; +#define ecl_clfloat(o) ((o)->clfloat.value) +#endif + enum ecl_stype { /* symbol type */ ecl_stp_ordinary = 0, ecl_stp_constant = 1, @@ -1031,6 +1056,11 @@ union cl_lispunion { struct ecl_long_float longfloat; /* long-float */ #endif struct ecl_complex complex; /* complex number */ +#ifdef ECL_COMPLEX_FLOAT + struct ecl_csfloat csfloat; /* complex single float */ + struct ecl_cdfloat cdfloat; /* complex double float */ + struct ecl_clfloat clfloat; /* complex long float */ +#endif struct ecl_symbol symbol; /* symbol */ struct ecl_package pack; /* package */ struct ecl_hashtable hash; /* hash table */