46
imod(cl_fixnum x, cl_fixnum y)
46
ecl_imod(cl_fixnum x, cl_fixnum y)
48
return(x - ifloor(x, y)*y);
48
return(x - ecl_ifloor(x, y)*y);
77
77
/* case t_character: return (cl_fixnum)CHAR_CODE(x); */
79
return (cl_fixnum)number_to_double(x);
79
return (cl_fixnum)ecl_to_double(x);
80
#ifdef ECL_SHORT_FLOAT
82
return (cl_fixnum)ecl_short_float(x);
81
85
return (cl_fixnum)sf(x);
87
return (cl_fixnum)df(x);
83
return (cl_fixnum)lf(x);
90
return (cl_fixnum)ecl_long_float(x);
85
93
FEerror("~S cannot be coerced to a C int.", 1, x);
90
object_to_unsigned_integer(cl_object x)
98
ecl_to_unsigned_integer(cl_object x)
92
100
switch (type_of(x)) {
95
103
return fixnnint(x);
97
return (cl_index)number_to_double(x);
105
return (cl_index)ecl_to_double(x);
106
#ifdef ECL_SHORT_FLOAT
98
107
case t_shortfloat:
108
return (cl_index)ecl_short_float(x);
99
111
return (cl_index)sf(x);
113
return (cl_index)df(x);
114
#ifdef ECL_LONG_FLOAT
100
115
case t_longfloat:
101
return (cl_index)lf(x);
116
return (cl_index)ecl_long_float(x);
103
119
FEerror("~S cannot be coerced to a C unsigned int.", 1, x);
108
object_to_float(cl_object x)
110
if (FIXNUMP(x)) return(fix(x)); /* Immediate fixnum */
112
switch (type_of(x)) {
113
/* case t_fixnum: return fix(x); */
114
/* case t_character: return CHAR_CODE(x); */
117
return number_to_double(x);
123
FEtype_error_real(x);
128
object_to_double(cl_object x)
131
if (FIXNUMP(x)) return(fix(x)); /* Immediate fixnum */
133
switch (type_of(x)) {
134
/* case t_fixnum: return fix(x); */
135
/* case t_character: return CHAR_CODE(x); */
138
return number_to_double(x);
124
ecl_to_float(cl_object x)
126
if (FIXNUMP(x)) return(fix(x)); /* Immediate fixnum */
128
switch (type_of(x)) {
129
/* case t_fixnum: return fix(x); */
130
/* case t_character: return CHAR_CODE(x); */
133
return ecl_to_double(x);
134
#ifdef ECL_SHORT_FLOAT
136
return ecl_short_float(x);
142
#ifdef ECL_LONG_FLOAT
144
return ecl_long_float(x);
144
147
FEtype_error_real(x);
149
aref_bv(cl_object x, cl_index index)
152
ecl_aref_bv(cl_object x, cl_index index)
151
154
index += x->vector.offset;
152
155
return ((x->vector.self.bit[index/CHAR_BIT] & (0200>>index%CHAR_BIT)) != 0);
156
aset_bv(cl_object x, cl_index index, int value)
159
ecl_aset_bv(cl_object x, cl_index index, int value)
158
161
index += x->vector.offset;