mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-15 09:20:23 -07:00
CHARACTERP, BASE_CHAR_P, BASE_CHAR_CODE_P, CODE_CHAR, CHAR_CODE, REAL_TYPE, IMMEDIATE, IMMEDIATE_TAG, FIXNUM_TAG, FIXNUM_MINUSP, FIXNUM_PLUSP, FIXNUMP and fix get the ecl_ prefix
This commit is contained in:
parent
6f2fd54130
commit
64a9168434
109 changed files with 1489 additions and 1438 deletions
|
|
@ -58,9 +58,9 @@ ecl_parse_integer(cl_object str, cl_index start, cl_index end,
|
|||
}
|
||||
|
||||
@(defun parse_integer (strng
|
||||
&key (start MAKE_FIXNUM(0))
|
||||
&key (start ecl_make_fixnum(0))
|
||||
end
|
||||
(radix MAKE_FIXNUM(10))
|
||||
(radix ecl_make_fixnum(10))
|
||||
junk_allowed
|
||||
&aux x)
|
||||
cl_index s, e, ep;
|
||||
|
|
@ -69,9 +69,9 @@ ecl_parse_integer(cl_object str, cl_index start, cl_index end,
|
|||
unlikely_if (!ECL_STRINGP(strng)) {
|
||||
FEwrong_type_nth_arg(@[parse-integer], 1, strng, @[string]);
|
||||
}
|
||||
unlikely_if (!FIXNUMP(radix) ||
|
||||
ecl_fixnum_lower(radix, MAKE_FIXNUM(2)) ||
|
||||
ecl_fixnum_greater(radix, MAKE_FIXNUM(36)))
|
||||
unlikely_if (!ECL_FIXNUMP(radix) ||
|
||||
ecl_fixnum_lower(radix, ecl_make_fixnum(2)) ||
|
||||
ecl_fixnum_greater(radix, ecl_make_fixnum(36)))
|
||||
{
|
||||
FEerror("~S is an illegal radix.", 1, radix);
|
||||
}
|
||||
|
|
@ -87,20 +87,20 @@ ecl_parse_integer(cl_object str, cl_index start, cl_index end,
|
|||
}
|
||||
if (s >= e) {
|
||||
if (junk_allowed != Cnil)
|
||||
@(return Cnil MAKE_FIXNUM(s))
|
||||
@(return Cnil ecl_make_fixnum(s))
|
||||
else
|
||||
goto CANNOT_PARSE;
|
||||
}
|
||||
x = ecl_parse_integer(strng, s, e, &ep, fix(radix));
|
||||
x = ecl_parse_integer(strng, s, e, &ep, ecl_fix(radix));
|
||||
if (x == OBJNULL) {
|
||||
if (junk_allowed != Cnil) {
|
||||
@(return Cnil MAKE_FIXNUM(ep));
|
||||
@(return Cnil ecl_make_fixnum(ep));
|
||||
} else {
|
||||
goto CANNOT_PARSE;
|
||||
}
|
||||
}
|
||||
if (junk_allowed != Cnil) {
|
||||
@(return x MAKE_FIXNUM(ep));
|
||||
@(return x ecl_make_fixnum(ep));
|
||||
}
|
||||
for (s = ep; s < e; s++) {
|
||||
unlikely_if (ecl_readtable_get(rtbl, ecl_char(strng, s), NULL)
|
||||
|
|
@ -110,5 +110,5 @@ CANNOT_PARSE: FEparse_error("Cannot parse an integer in the string ~S.",
|
|||
Cnil, 1, strng);
|
||||
}
|
||||
}
|
||||
@(return x MAKE_FIXNUM(e));
|
||||
@(return x ecl_make_fixnum(e));
|
||||
} @)
|
||||
|
|
|
|||
|
|
@ -73,10 +73,10 @@ infinity(cl_index exp_char, int sign)
|
|||
static cl_object
|
||||
make_float(cl_object num, cl_object exp, cl_index exp_char, int sign)
|
||||
{
|
||||
if (!FIXNUMP(exp)) {
|
||||
if (!ECL_FIXNUMP(exp)) {
|
||||
return infinity(exp_char, sign);
|
||||
} else {
|
||||
cl_fixnum fix_exp = fix(exp);
|
||||
cl_fixnum fix_exp = ecl_fix(exp);
|
||||
if (fix_exp > 0) {
|
||||
num = ecl_times(num, expt10(fix_exp));
|
||||
} else if (fix_exp < 0) {
|
||||
|
|
@ -152,7 +152,7 @@ ecl_parse_number(cl_object str, cl_index start, cl_index end,
|
|||
den = ecl_parse_integer(str, i, end, ep, radix);
|
||||
if (den == OBJNULL || (*ep < end)) {
|
||||
return OBJNULL;
|
||||
} else if (den == MAKE_FIXNUM(0)) {
|
||||
} else if (den == ecl_make_fixnum(0)) {
|
||||
return Cnil;
|
||||
} else {
|
||||
return ecl_make_ratio(num, den);
|
||||
|
|
@ -184,8 +184,8 @@ ecl_parse_number(cl_object str, cl_index start, cl_index end,
|
|||
}
|
||||
num = _ecl_big_register_normalize(num);
|
||||
decimals = (decimal < i) ?
|
||||
MAKE_FIXNUM(decimal - i):
|
||||
MAKE_FIXNUM(0);
|
||||
ecl_make_fixnum(decimal - i):
|
||||
ecl_make_fixnum(0);
|
||||
exp = ecl_parse_integer(str, ++i, end, ep, 10);
|
||||
if (exp == OBJNULL || (*ep < end))
|
||||
return OBJNULL;
|
||||
|
|
@ -217,7 +217,7 @@ ecl_parse_number(cl_object str, cl_index start, cl_index end,
|
|||
if (decimal < i) {
|
||||
if (!some_digit) goto NOT_A_NUMBER;
|
||||
return make_float(_ecl_big_register_normalize(num),
|
||||
MAKE_FIXNUM(decimal - i), 'e', sign);
|
||||
ecl_make_fixnum(decimal - i), 'e', sign);
|
||||
} else {
|
||||
if (sign < 0) _ecl_big_complement(num, num);
|
||||
return _ecl_big_register_normalize(num);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue