mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
* __scm.h, chars.c, debug.c, eval.c, eval.h, extchrs.c, extchrs.h,
fdsocket.c, feature.c, mbstrings.c, mbstrings.h, numbers.c, numbers.h, print.c, scmhob.h, simpos.h, symbols.c, symbols.h, tags.h, throw.c, variable.h: Name cleanup. Lots of xxxSCM_yyy removed. (These were introduced by unsupervised name substitution.)
This commit is contained in:
parent
1a80fb07a7
commit
e2806c1000
11 changed files with 60 additions and 60 deletions
|
@ -137,7 +137,7 @@ typedef unsigned long ulong_long;
|
||||||
|
|
||||||
/* Define
|
/* Define
|
||||||
*
|
*
|
||||||
* SCM_CHAR_SCM_CODE_LIMIT == UCHAR_MAX + 1
|
* SCM_CHAR_CODE_LIMIT == UCHAR_MAX + 1
|
||||||
* SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
|
* SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
|
||||||
* SCM_MOST_NEGATIVE_FIXNUM == SCM_SRS((long)LONG_MIN, 2)
|
* SCM_MOST_NEGATIVE_FIXNUM == SCM_SRS((long)LONG_MIN, 2)
|
||||||
*/
|
*/
|
||||||
|
@ -145,9 +145,9 @@ typedef unsigned long ulong_long;
|
||||||
#ifdef HAVE_LIMITS_H
|
#ifdef HAVE_LIMITS_H
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
# ifdef UCHAR_MAX
|
# ifdef UCHAR_MAX
|
||||||
# define SCM_CHAR_SCM_CODE_LIMIT (UCHAR_MAX+1L)
|
# define SCM_CHAR_CODE_LIMIT (UCHAR_MAX+1L)
|
||||||
# else
|
# else
|
||||||
# define SCM_CHAR_SCM_CODE_LIMIT 256L
|
# define SCM_CHAR_CODE_LIMIT 256L
|
||||||
# endif /* def UCHAR_MAX */
|
# endif /* def UCHAR_MAX */
|
||||||
# define SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
|
# define SCM_MOST_POSITIVE_FIXNUM (LONG_MAX>>2)
|
||||||
# ifdef _UNICOS /* Stupid cray bug */
|
# ifdef _UNICOS /* Stupid cray bug */
|
||||||
|
@ -156,7 +156,7 @@ typedef unsigned long ulong_long;
|
||||||
# define SCM_MOST_NEGATIVE_FIXNUM SCM_SRS((long)LONG_MIN, 2)
|
# define SCM_MOST_NEGATIVE_FIXNUM SCM_SRS((long)LONG_MIN, 2)
|
||||||
# endif /* UNICOS */
|
# endif /* UNICOS */
|
||||||
#else
|
#else
|
||||||
# define SCM_CHAR_SCM_CODE_LIMIT 256L
|
# define SCM_CHAR_CODE_LIMIT 256L
|
||||||
# define SCM_MOST_POSITIVE_FIXNUM ((long)((unsigned long)~0L>>3))
|
# define SCM_MOST_POSITIVE_FIXNUM ((long)((unsigned long)~0L>>3))
|
||||||
# if (0 != ~0)
|
# if (0 != ~0)
|
||||||
# define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM-1)
|
# define SCM_MOST_NEGATIVE_FIXNUM (-SCM_MOST_POSITIVE_FIXNUM-1)
|
||||||
|
@ -361,7 +361,7 @@ extern unsigned int scm_async_clock;
|
||||||
* Also, SCM_WNA must follow the last SCM_ARGn in sequence.
|
* Also, SCM_WNA must follow the last SCM_ARGn in sequence.
|
||||||
*/
|
*/
|
||||||
#define SCM_WNA 8
|
#define SCM_WNA 8
|
||||||
#define SCM_OVSCM_FLOW 9
|
#define SCM_OVFLOW 9
|
||||||
#define SCM_OUTOFRANGE 10
|
#define SCM_OUTOFRANGE 10
|
||||||
#define SCM_NALLOC 11
|
#define SCM_NALLOC 11
|
||||||
#define SCM_STACK_OVFLOW 12
|
#define SCM_STACK_OVFLOW 12
|
||||||
|
|
|
@ -384,8 +384,8 @@ scm_char_downcase(chr)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static unsigned char scm_upcase_table[SCM_CHAR_SCM_CODE_LIMIT];
|
static unsigned char scm_upcase_table[SCM_CHAR_CODE_LIMIT];
|
||||||
static unsigned char scm_downcase_table[SCM_CHAR_SCM_CODE_LIMIT];
|
static unsigned char scm_downcase_table[SCM_CHAR_CODE_LIMIT];
|
||||||
static unsigned char scm_lowers[] = "abcdefghijklmnopqrstuvwxyz";
|
static unsigned char scm_lowers[] = "abcdefghijklmnopqrstuvwxyz";
|
||||||
static unsigned char scm_uppers[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
static unsigned char scm_uppers[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ scm_tables_prehistory ()
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < SCM_CHAR_SCM_CODE_LIMIT; i++)
|
for (i = 0; i < SCM_CHAR_CODE_LIMIT; i++)
|
||||||
scm_upcase_table[i] = scm_downcase_table[i] = i;
|
scm_upcase_table[i] = scm_downcase_table[i] = i;
|
||||||
for (i = 0; i < sizeof scm_lowers / sizeof (char); i++)
|
for (i = 0; i < sizeof scm_lowers / sizeof (char); i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -278,7 +278,7 @@ scm_procedure_source (proc)
|
||||||
src = SCM_CODE (proc);
|
src = SCM_CODE (proc);
|
||||||
return scm_cons (scm_i_lambda,
|
return scm_cons (scm_i_lambda,
|
||||||
scm_unmemocopy (src,
|
scm_unmemocopy (src,
|
||||||
SCM_EXTEND_SCM_ENV (SCM_CAR (src),
|
SCM_EXTEND_ENV (SCM_CAR (src),
|
||||||
SCM_EOL,
|
SCM_EOL,
|
||||||
SCM_ENV (proc))));
|
SCM_ENV (proc))));
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@
|
||||||
#define XEVALCAR(x, env) EVALCAR(x, env)
|
#define XEVALCAR(x, env) EVALCAR(x, env)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EXTEND_SCM_ENV SCM_EXTEND_SCM_ENV
|
#define EXTEND_ENV SCM_EXTEND_ENV
|
||||||
|
|
||||||
#ifdef MEMOIZE_LOCALS
|
#ifdef MEMOIZE_LOCALS
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
|
@ -978,7 +978,7 @@ scm_m_apply (xorig, env)
|
||||||
return scm_cons (SCM_IM_APPLY, SCM_CDR (xorig));
|
return scm_cons (SCM_IM_APPLY, SCM_CDR (xorig));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define s_atcall_cc (SCM_ISYMSCM_CHARS(SCM_IM_CONT)+1)
|
#define s_atcall_cc (SCM_ISYMCHARS(SCM_IM_CONT)+1)
|
||||||
|
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
SCM
|
SCM
|
||||||
|
@ -1052,7 +1052,7 @@ unmemocopy (x, env)
|
||||||
x = SCM_CDR (x);
|
x = SCM_CDR (x);
|
||||||
f = v = SCM_CAR (x);
|
f = v = SCM_CAR (x);
|
||||||
x = SCM_CDR (x);
|
x = SCM_CDR (x);
|
||||||
z = EXTEND_SCM_ENV (f, SCM_EOL, env);
|
z = EXTEND_ENV (f, SCM_EOL, env);
|
||||||
e = scm_reverse (unmemocopy (SCM_CAR (x),
|
e = scm_reverse (unmemocopy (SCM_CAR (x),
|
||||||
SCM_CAR (ls) == scm_i_letrec ? z : env));
|
SCM_CAR (ls) == scm_i_letrec ? z : env));
|
||||||
env = z;
|
env = z;
|
||||||
|
@ -1091,14 +1091,14 @@ unmemocopy (x, env)
|
||||||
y = SCM_EOL;
|
y = SCM_EOL;
|
||||||
if SCM_IMP (b)
|
if SCM_IMP (b)
|
||||||
{
|
{
|
||||||
env = EXTEND_SCM_ENV (SCM_EOL, SCM_EOL, env);
|
env = EXTEND_ENV (SCM_EOL, SCM_EOL, env);
|
||||||
goto letstar;
|
goto letstar;
|
||||||
}
|
}
|
||||||
y = z = scm_acons (SCM_CAR (b),
|
y = z = scm_acons (SCM_CAR (b),
|
||||||
unmemocar (
|
unmemocar (
|
||||||
scm_cons (unmemocopy (SCM_CAR (SCM_CDR (b)), env), SCM_EOL), env),
|
scm_cons (unmemocopy (SCM_CAR (SCM_CDR (b)), env), SCM_EOL), env),
|
||||||
SCM_UNSPECIFIED);
|
SCM_UNSPECIFIED);
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (b), SCM_BOOL_F, env);
|
env = EXTEND_ENV (SCM_CAR (b), SCM_BOOL_F, env);
|
||||||
b = SCM_CDR (SCM_CDR (b));
|
b = SCM_CDR (SCM_CDR (b));
|
||||||
if (SCM_IMP (b))
|
if (SCM_IMP (b))
|
||||||
{
|
{
|
||||||
|
@ -1112,7 +1112,7 @@ unmemocopy (x, env)
|
||||||
unmemocar (
|
unmemocar (
|
||||||
scm_cons (unmemocopy (SCM_CAR (SCM_CDR (b)), env), SCM_EOL), env),
|
scm_cons (unmemocopy (SCM_CAR (SCM_CDR (b)), env), SCM_EOL), env),
|
||||||
SCM_UNSPECIFIED));
|
SCM_UNSPECIFIED));
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (b), SCM_BOOL_F, env);
|
env = EXTEND_ENV (SCM_CAR (b), SCM_BOOL_F, env);
|
||||||
b = SCM_CDR (SCM_CDR (b));
|
b = SCM_CDR (SCM_CDR (b));
|
||||||
}
|
}
|
||||||
while SCM_NIMP (b);
|
while SCM_NIMP (b);
|
||||||
|
@ -1128,7 +1128,7 @@ unmemocopy (x, env)
|
||||||
x = SCM_CDR (x);
|
x = SCM_CDR (x);
|
||||||
ls = scm_cons (scm_i_lambda,
|
ls = scm_cons (scm_i_lambda,
|
||||||
z = scm_cons (SCM_CAR (x), SCM_UNSPECIFIED));
|
z = scm_cons (SCM_CAR (x), SCM_UNSPECIFIED));
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (x), SCM_EOL, env);
|
env = EXTEND_ENV (SCM_CAR (x), SCM_EOL, env);
|
||||||
break;
|
break;
|
||||||
case (127 & SCM_IM_QUOTE):
|
case (127 & SCM_IM_QUOTE):
|
||||||
ls = z = scm_cons (scm_i_quote, SCM_UNSPECIFIED);
|
ls = z = scm_cons (scm_i_quote, SCM_UNSPECIFIED);
|
||||||
|
@ -1637,7 +1637,7 @@ dispatch:
|
||||||
t.arg1 = scm_cons (EVALCAR (proc, env), t.arg1);
|
t.arg1 = scm_cons (EVALCAR (proc, env), t.arg1);
|
||||||
proc = SCM_CDR (proc);
|
proc = SCM_CDR (proc);
|
||||||
}
|
}
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (x), t.arg1, env);
|
env = EXTEND_ENV (SCM_CAR (x), t.arg1, env);
|
||||||
x = SCM_CDR (SCM_CDR (x));
|
x = SCM_CDR (SCM_CDR (x));
|
||||||
while (proc = SCM_CAR (x), SCM_FALSEP (EVALCAR (proc, env)))
|
while (proc = SCM_CAR (x), SCM_FALSEP (EVALCAR (proc, env)))
|
||||||
{
|
{
|
||||||
|
@ -1648,7 +1648,7 @@ dispatch:
|
||||||
}
|
}
|
||||||
for (t.arg1 = SCM_EOL, proc = SCM_CDR (SCM_CDR (x)); SCM_NIMP (proc); proc = SCM_CDR (proc))
|
for (t.arg1 = SCM_EOL, proc = SCM_CDR (SCM_CDR (x)); SCM_NIMP (proc); proc = SCM_CDR (proc))
|
||||||
t.arg1 = scm_cons (EVALCAR (proc, env), t.arg1); /* steps */
|
t.arg1 = scm_cons (EVALCAR (proc, env), t.arg1); /* steps */
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (SCM_CAR (env)), t.arg1, SCM_CDR (env));
|
env = EXTEND_ENV (SCM_CAR (SCM_CAR (env)), t.arg1, SCM_CDR (env));
|
||||||
}
|
}
|
||||||
x = SCM_CDR (proc);
|
x = SCM_CDR (proc);
|
||||||
if (SCM_NULLP (x))
|
if (SCM_NULLP (x))
|
||||||
|
@ -1678,14 +1678,14 @@ dispatch:
|
||||||
t.arg1 = scm_cons (EVALCAR (proc, env), t.arg1);
|
t.arg1 = scm_cons (EVALCAR (proc, env), t.arg1);
|
||||||
}
|
}
|
||||||
while (SCM_NIMP (proc = SCM_CDR (proc)));
|
while (SCM_NIMP (proc = SCM_CDR (proc)));
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (x), t.arg1, env);
|
env = EXTEND_ENV (SCM_CAR (x), t.arg1, env);
|
||||||
x = SCM_CDR (x);
|
x = SCM_CDR (x);
|
||||||
goto cdrxnoap;
|
goto cdrxnoap;
|
||||||
|
|
||||||
|
|
||||||
case (127 & SCM_IM_LETREC):
|
case (127 & SCM_IM_LETREC):
|
||||||
x = SCM_CDR (x);
|
x = SCM_CDR (x);
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (x), scm_undefineds, env);
|
env = EXTEND_ENV (SCM_CAR (x), scm_undefineds, env);
|
||||||
x = SCM_CDR (x);
|
x = SCM_CDR (x);
|
||||||
proc = SCM_CAR (x);
|
proc = SCM_CAR (x);
|
||||||
t.arg1 = SCM_EOL;
|
t.arg1 = SCM_EOL;
|
||||||
|
@ -1703,14 +1703,14 @@ dispatch:
|
||||||
proc = SCM_CAR (x);
|
proc = SCM_CAR (x);
|
||||||
if (SCM_IMP (proc))
|
if (SCM_IMP (proc))
|
||||||
{
|
{
|
||||||
env = EXTEND_SCM_ENV (SCM_EOL, SCM_EOL, env);
|
env = EXTEND_ENV (SCM_EOL, SCM_EOL, env);
|
||||||
goto cdrxnoap;
|
goto cdrxnoap;
|
||||||
}
|
}
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
t.arg1 = SCM_CAR (proc);
|
t.arg1 = SCM_CAR (proc);
|
||||||
proc = SCM_CDR (proc);
|
proc = SCM_CDR (proc);
|
||||||
env = EXTEND_SCM_ENV (t.arg1, EVALCAR (proc, env), env);
|
env = EXTEND_ENV (t.arg1, EVALCAR (proc, env), env);
|
||||||
}
|
}
|
||||||
while (SCM_NIMP (proc = SCM_CDR (proc)));
|
while (SCM_NIMP (proc = SCM_CDR (proc)));
|
||||||
goto cdrxnoap;
|
goto cdrxnoap;
|
||||||
|
@ -1818,7 +1818,7 @@ dispatch:
|
||||||
if (scm_badargsp (SCM_CAR (SCM_CODE (proc)), t.arg1))
|
if (scm_badargsp (SCM_CAR (SCM_CODE (proc)), t.arg1))
|
||||||
goto wrongnumargs;
|
goto wrongnumargs;
|
||||||
#endif
|
#endif
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (SCM_CODE (proc)), t.arg1, SCM_ENV (proc));
|
env = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)), t.arg1, SCM_ENV (proc));
|
||||||
x = SCM_CODE (proc);
|
x = SCM_CODE (proc);
|
||||||
goto cdrxbegin;
|
goto cdrxbegin;
|
||||||
}
|
}
|
||||||
|
@ -2008,7 +2008,7 @@ evapply:
|
||||||
#endif
|
#endif
|
||||||
case scm_tcs_closures:
|
case scm_tcs_closures:
|
||||||
x = SCM_CODE (proc);
|
x = SCM_CODE (proc);
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (x), SCM_EOL, SCM_ENV (proc));
|
env = EXTEND_ENV (SCM_CAR (x), SCM_EOL, SCM_ENV (proc));
|
||||||
goto cdrxbegin;
|
goto cdrxbegin;
|
||||||
case scm_tc7_contin:
|
case scm_tc7_contin:
|
||||||
case scm_tc7_subr_1:
|
case scm_tc7_subr_1:
|
||||||
|
@ -2108,9 +2108,9 @@ evapply:
|
||||||
case scm_tcs_closures:
|
case scm_tcs_closures:
|
||||||
x = SCM_CODE (proc);
|
x = SCM_CODE (proc);
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (x), debug.info->a.args, SCM_ENV (proc));
|
env = EXTEND_ENV (SCM_CAR (x), debug.info->a.args, SCM_ENV (proc));
|
||||||
#else
|
#else
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (x), scm_cons (t.arg1, SCM_EOL), SCM_ENV (proc));
|
env = EXTEND_ENV (SCM_CAR (x), scm_cons (t.arg1, SCM_EOL), SCM_ENV (proc));
|
||||||
#endif
|
#endif
|
||||||
goto cdrxbegin;
|
goto cdrxbegin;
|
||||||
case scm_tc7_contin:
|
case scm_tc7_contin:
|
||||||
|
@ -2184,9 +2184,9 @@ evapply:
|
||||||
goto badfun;
|
goto badfun;
|
||||||
case scm_tcs_closures:
|
case scm_tcs_closures:
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (SCM_CODE (proc)), debug.info->a.args, SCM_ENV (proc));
|
env = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)), debug.info->a.args, SCM_ENV (proc));
|
||||||
#else
|
#else
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (SCM_CODE (proc)), scm_cons2 (t.arg1, arg2, SCM_EOL), SCM_ENV (proc));
|
env = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)), scm_cons2 (t.arg1, arg2, SCM_EOL), SCM_ENV (proc));
|
||||||
#endif
|
#endif
|
||||||
x = SCM_CODE (proc);
|
x = SCM_CODE (proc);
|
||||||
goto cdrxbegin;
|
goto cdrxbegin;
|
||||||
|
@ -2222,7 +2222,7 @@ evapply:
|
||||||
#endif
|
#endif
|
||||||
case scm_tcs_closures:
|
case scm_tcs_closures:
|
||||||
SCM_SET_ARGSREADY (debug);
|
SCM_SET_ARGSREADY (debug);
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (SCM_CODE (proc)),
|
env = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)),
|
||||||
debug.info->a.args,
|
debug.info->a.args,
|
||||||
SCM_ENV (proc));
|
SCM_ENV (proc));
|
||||||
x = SCM_CODE (proc);
|
x = SCM_CODE (proc);
|
||||||
|
@ -2252,7 +2252,7 @@ evapply:
|
||||||
#ifdef DEVAL
|
#ifdef DEVAL
|
||||||
SCM_SET_ARGSREADY (debug);
|
SCM_SET_ARGSREADY (debug);
|
||||||
#endif
|
#endif
|
||||||
env = EXTEND_SCM_ENV (SCM_CAR (SCM_CODE (proc)),
|
env = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)),
|
||||||
scm_cons2 (t.arg1, arg2, scm_eval_args (x, env)),
|
scm_cons2 (t.arg1, arg2, scm_eval_args (x, env)),
|
||||||
SCM_ENV (proc));
|
SCM_ENV (proc));
|
||||||
x = SCM_CODE (proc);
|
x = SCM_CODE (proc);
|
||||||
|
@ -2557,7 +2557,7 @@ tail:
|
||||||
if (scm_badargsp (SCM_CAR (SCM_CODE (proc)), arg1))
|
if (scm_badargsp (SCM_CAR (SCM_CODE (proc)), arg1))
|
||||||
goto wrongnumargs;
|
goto wrongnumargs;
|
||||||
#endif
|
#endif
|
||||||
args = EXTEND_SCM_ENV (SCM_CAR (SCM_CODE (proc)), arg1, SCM_ENV (proc));
|
args = EXTEND_ENV (SCM_CAR (SCM_CODE (proc)), arg1, SCM_ENV (proc));
|
||||||
proc = SCM_CODE (proc);
|
proc = SCM_CODE (proc);
|
||||||
while (SCM_NNULLP (proc = SCM_CDR (proc)))
|
while (SCM_NNULLP (proc = SCM_CDR (proc)))
|
||||||
arg1 = EVALCAR (proc, args);
|
arg1 = EVALCAR (proc, args);
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define SCM_EXTEND_SCM_ENV scm_acons
|
#define SCM_EXTEND_ENV scm_acons
|
||||||
|
|
||||||
|
|
||||||
extern SCM scm_i_dot;
|
extern SCM scm_i_dot;
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef FAKE_EXT_SCM_CHARS
|
#ifdef SCM_FAKE_EXT_CHARS
|
||||||
|
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
int
|
int
|
||||||
|
@ -142,5 +142,5 @@ xmbtowc (result, str, size)
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* FAKE_EXT_SCM_CHARS */
|
#endif /* SCM_FAKE_EXT_CHARS */
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,9 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define FAKE_EXT_SCM_CHARS 1
|
#define SCM_FAKE_EXT_CHARS 1
|
||||||
|
|
||||||
#if !defined(FAKE_EXT_SCM_CHARS)
|
#if !defined(SCM_FAKE_EXT_CHARS)
|
||||||
|
|
||||||
#define xmblen mblen
|
#define xmblen mblen
|
||||||
#define xwctomb wctomb
|
#define xwctomb wctomb
|
||||||
|
|
|
@ -96,6 +96,6 @@ scm_init_feature()
|
||||||
scm_add_feature ("full-continuation");
|
scm_add_feature ("full-continuation");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
scm_sysintern ("char-code-limit", SCM_MAKINUM (SCM_CHAR_SCM_CODE_LIMIT));
|
scm_sysintern ("char-code-limit", SCM_MAKINUM (SCM_CHAR_CODE_LIMIT));
|
||||||
#include "feature.x"
|
#include "feature.x"
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ scm_symbol_multi_byte_p (symbol)
|
||||||
SCM symbol;
|
SCM symbol;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
return SCM_SYMBOL_MULTI_BYTE_SCM_STRINGP(symbol);
|
return SCM_SYMBOL_MULTI_BYTE_STRINGP(symbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
SCM_PROC(s_set_symbol_multi_byte_x, "set-symbol-multi-byte!", 2, 0, 0, scm_set_symbol_multi_byte_x);
|
SCM_PROC(s_set_symbol_multi_byte_x, "set-symbol-multi-byte!", 2, 0, 0, scm_set_symbol_multi_byte_x);
|
||||||
|
@ -209,7 +209,7 @@ scm_set_symbol_multi_byte_x (symbol, val)
|
||||||
{
|
{
|
||||||
if (SCM_TYP7 (symbol) == scm_tc7_msymbol)
|
if (SCM_TYP7 (symbol) == scm_tc7_msymbol)
|
||||||
{
|
{
|
||||||
SCM_SYMBOL_MULTI_BYTE_SCM_STRINGP(symbol) = (SCM_FALSEP (val)
|
SCM_SYMBOL_MULTI_BYTE_STRINGP(symbol) = (SCM_FALSEP (val)
|
||||||
? SCM_BOOL_F
|
? SCM_BOOL_F
|
||||||
: SCM_BOOL_T);
|
: SCM_BOOL_T);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
#define SCM_MB_STRINGP(x) ( (SCM_TYP7(x)==scm_tc7_mb_string) \
|
#define SCM_MB_STRINGP(x) ( (SCM_TYP7(x)==scm_tc7_mb_string) \
|
||||||
|| ( (SCM_TYP7(x) == scm_tc7_msymbol) \
|
|| ( (SCM_TYP7(x) == scm_tc7_msymbol) \
|
||||||
&& (SCM_SYMBOL_MULTI_BYTE_SCM_STRINGP (x) != SCM_BOOL_F)))
|
&& (SCM_SYMBOL_MULTI_BYTE_STRINGP (x) != SCM_BOOL_F)))
|
||||||
#define SCM_REGULAR_STRINGP(x) (SCM_TYP7D(x)==scm_tc7_string)
|
#define SCM_REGULAR_STRINGP(x) (SCM_TYP7D(x)==scm_tc7_string)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -162,11 +162,11 @@ scm_abs(x)
|
||||||
#endif
|
#endif
|
||||||
if (SCM_INUM(x) >= 0) return x;
|
if (SCM_INUM(x) >= 0) return x;
|
||||||
x = -SCM_INUM(x);
|
x = -SCM_INUM(x);
|
||||||
if (!SCM_POSSCM_FIXABLE(x))
|
if (!SCM_POSFIXABLE(x))
|
||||||
#ifdef SCM_BIGDIG
|
#ifdef SCM_BIGDIG
|
||||||
return scm_long2big(x);
|
return scm_long2big(x);
|
||||||
#else
|
#else
|
||||||
scm_wta(SCM_MAKINUM(-x), (char *)SCM_OVSCM_FLOW, s_abs);
|
scm_wta(SCM_MAKINUM(-x), (char *)SCM_OVFLOW, s_abs);
|
||||||
#endif
|
#endif
|
||||||
return SCM_MAKINUM(x);
|
return SCM_MAKINUM(x);
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,7 @@ scm_quotient(x, y)
|
||||||
SCM_ASSERT(SCM_INUMP(y), y, SCM_ARG2, s_quotient);
|
SCM_ASSERT(SCM_INUMP(y), y, SCM_ARG2, s_quotient);
|
||||||
#endif
|
#endif
|
||||||
if ((z = SCM_INUM(y))==0)
|
if ((z = SCM_INUM(y))==0)
|
||||||
ov: scm_wta(y, (char *)SCM_OVSCM_FLOW, s_quotient);
|
ov: scm_wta(y, (char *)SCM_OVFLOW, s_quotient);
|
||||||
z = SCM_INUM(x)/z;
|
z = SCM_INUM(x)/z;
|
||||||
#ifdef BADIVSGNS
|
#ifdef BADIVSGNS
|
||||||
{
|
{
|
||||||
|
@ -249,7 +249,7 @@ scm_quotient(x, y)
|
||||||
#ifdef SCM_BIGDIG
|
#ifdef SCM_BIGDIG
|
||||||
return scm_long2big(z);
|
return scm_long2big(z);
|
||||||
#else
|
#else
|
||||||
scm_wta(x, (char *)SCM_OVSCM_FLOW, s_quotient);
|
scm_wta(x, (char *)SCM_OVFLOW, s_quotient);
|
||||||
#endif
|
#endif
|
||||||
return SCM_MAKINUM(z);
|
return SCM_MAKINUM(z);
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,7 @@ scm_remainder(x, y)
|
||||||
SCM_ASSERT(SCM_INUMP(y), y, SCM_ARG2, s_remainder);
|
SCM_ASSERT(SCM_INUMP(y), y, SCM_ARG2, s_remainder);
|
||||||
#endif
|
#endif
|
||||||
if (!(z = SCM_INUM(y)))
|
if (!(z = SCM_INUM(y)))
|
||||||
ov: scm_wta(y, (char *)SCM_OVSCM_FLOW, s_remainder);
|
ov: scm_wta(y, (char *)SCM_OVFLOW, s_remainder);
|
||||||
#if (__TURBOC__==1)
|
#if (__TURBOC__==1)
|
||||||
if (z < 0) z = -z;
|
if (z < 0) z = -z;
|
||||||
#endif
|
#endif
|
||||||
|
@ -339,7 +339,7 @@ scm_modulo(x, y)
|
||||||
SCM_ASSERT(SCM_INUMP(y), y, SCM_ARG2, s_modulo);
|
SCM_ASSERT(SCM_INUMP(y), y, SCM_ARG2, s_modulo);
|
||||||
#endif
|
#endif
|
||||||
if (!(yy = SCM_INUM(y)))
|
if (!(yy = SCM_INUM(y)))
|
||||||
ov: scm_wta(y, (char *)SCM_OVSCM_FLOW, s_modulo);
|
ov: scm_wta(y, (char *)SCM_OVFLOW, s_modulo);
|
||||||
#if (__TURBOC__==1)
|
#if (__TURBOC__==1)
|
||||||
z = SCM_INUM(x);
|
z = SCM_INUM(x);
|
||||||
z = ((yy<0) ? -z : z)%yy;
|
z = ((yy<0) ? -z : z)%yy;
|
||||||
|
@ -406,11 +406,11 @@ scm_gcd(x, y)
|
||||||
if ((t = u-v)) goto b3;
|
if ((t = u-v)) goto b3;
|
||||||
u = u*k;
|
u = u*k;
|
||||||
getout:
|
getout:
|
||||||
if (!SCM_POSSCM_FIXABLE(u))
|
if (!SCM_POSFIXABLE(u))
|
||||||
#ifdef SCM_BIGDIG
|
#ifdef SCM_BIGDIG
|
||||||
return scm_long2big(u);
|
return scm_long2big(u);
|
||||||
#else
|
#else
|
||||||
scm_wta(x, (char *)SCM_OVSCM_FLOW, s_gcd);
|
scm_wta(x, (char *)SCM_OVFLOW, s_gcd);
|
||||||
#endif
|
#endif
|
||||||
return SCM_MAKINUM(u);
|
return SCM_MAKINUM(u);
|
||||||
}
|
}
|
||||||
|
@ -675,7 +675,7 @@ scm_ash(n, cnt)
|
||||||
cnt = SCM_INUM(cnt);
|
cnt = SCM_INUM(cnt);
|
||||||
if (cnt < 0) return SCM_MAKINUM(SCM_SRS(res, -cnt));
|
if (cnt < 0) return SCM_MAKINUM(SCM_SRS(res, -cnt));
|
||||||
res = SCM_MAKINUM(res<<cnt);
|
res = SCM_MAKINUM(res<<cnt);
|
||||||
if (SCM_INUM(res)>>cnt != SCM_INUM(n)) scm_wta(n, (char *)SCM_OVSCM_FLOW, s_ash);
|
if (SCM_INUM(res)>>cnt != SCM_INUM(n)) scm_wta(n, (char *)SCM_OVFLOW, s_ash);
|
||||||
return res;
|
return res;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -809,9 +809,9 @@ scm_big2inum(b, l)
|
||||||
SCM_BIGDIG *tmp = SCM_BDIGITS(b);
|
SCM_BIGDIG *tmp = SCM_BDIGITS(b);
|
||||||
while (l--) num = SCM_BIGUP(num) + tmp[l];
|
while (l--) num = SCM_BIGUP(num) + tmp[l];
|
||||||
if (SCM_TYP16(b)==scm_tc16_bigpos) {
|
if (SCM_TYP16(b)==scm_tc16_bigpos) {
|
||||||
if SCM_POSSCM_FIXABLE(num) return SCM_MAKINUM(num);
|
if SCM_POSFIXABLE(num) return SCM_MAKINUM(num);
|
||||||
}
|
}
|
||||||
else if SCM_UNEGSCM_FIXABLE(num) return SCM_MAKINUM(-num);
|
else if SCM_UNEGFIXABLE(num) return SCM_MAKINUM(-num);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1674,7 +1674,7 @@ scm_istr2int(str, len, radix)
|
||||||
ds[k++] = SCM_BIGLO(t2);
|
ds[k++] = SCM_BIGLO(t2);
|
||||||
t2 = SCM_BIGDN(t2);
|
t2 = SCM_BIGDN(t2);
|
||||||
}
|
}
|
||||||
SCM_ASSERT(blen <= j, (SCM)SCM_MAKINUM(blen), SCM_OVSCM_FLOW, "bignum");
|
SCM_ASSERT(blen <= j, (SCM)SCM_MAKINUM(blen), SCM_OVFLOW, "bignum");
|
||||||
if (t2) {blen++; goto moretodo;}
|
if (t2) {blen++; goto moretodo;}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -2808,7 +2808,7 @@ scm_sum(x, y)
|
||||||
# ifdef SCM_FLOATS
|
# ifdef SCM_FLOATS
|
||||||
return scm_makdbl((double)x, 0.0);
|
return scm_makdbl((double)x, 0.0);
|
||||||
# else
|
# else
|
||||||
scm_wta(y, (char *)SCM_OVSCM_FLOW, s_sum);
|
scm_wta(y, (char *)SCM_OVFLOW, s_sum);
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -2951,7 +2951,7 @@ scm_difference(x, y)
|
||||||
# ifdef SCM_FLOATS
|
# ifdef SCM_FLOATS
|
||||||
return scm_makdbl((double)x, 0.0);
|
return scm_makdbl((double)x, 0.0);
|
||||||
# else
|
# else
|
||||||
scm_wta(y, (char *)SCM_OVSCM_FLOW, s_difference);
|
scm_wta(y, (char *)SCM_OVFLOW, s_difference);
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -3105,7 +3105,7 @@ scm_product(x, y)
|
||||||
# ifdef SCM_FLOATS
|
# ifdef SCM_FLOATS
|
||||||
return scm_makdbl(((double)i)*((double)j), 0.0);
|
return scm_makdbl(((double)i)*((double)j), 0.0);
|
||||||
# else
|
# else
|
||||||
scm_wta(y, (char *)SCM_OVSCM_FLOW, s_product);
|
scm_wta(y, (char *)SCM_OVFLOW, s_product);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
return y;
|
return y;
|
||||||
|
@ -3183,7 +3183,7 @@ scm_divide(x, y)
|
||||||
SCM z;
|
SCM z;
|
||||||
if SCM_INUMP(y) {
|
if SCM_INUMP(y) {
|
||||||
z = SCM_INUM(y);
|
z = SCM_INUM(y);
|
||||||
SCM_ASSERT(z, y, SCM_OVSCM_FLOW, s_divide);
|
SCM_ASSERT(z, y, SCM_OVFLOW, s_divide);
|
||||||
if (1==z) return x;
|
if (1==z) return x;
|
||||||
if (z < 0) z = -z;
|
if (z < 0) z = -z;
|
||||||
if (z < SCM_BIGRAD) {
|
if (z < SCM_BIGRAD) {
|
||||||
|
@ -3323,7 +3323,7 @@ scm_divide(x, y)
|
||||||
#ifdef SCM_FLOATS
|
#ifdef SCM_FLOATS
|
||||||
ov: return scm_makdbl(((double)SCM_INUM(x))/((double)SCM_INUM(y)), 0.0);
|
ov: return scm_makdbl(((double)SCM_INUM(x))/((double)SCM_INUM(y)), 0.0);
|
||||||
#else
|
#else
|
||||||
ov: scm_wta(x, (char *)SCM_OVSCM_FLOW, s_divide);
|
ov: scm_wta(x, (char *)SCM_OVFLOW, s_divide);
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -3768,7 +3768,7 @@ scm_dbl2big(d)
|
||||||
u -= c;
|
u -= c;
|
||||||
digits[i] = c;
|
digits[i] = c;
|
||||||
}
|
}
|
||||||
SCM_ASSERT(0==u, SCM_INUM0, SCM_OVSCM_FLOW, "dbl2big");
|
SCM_ASSERT(0==u, SCM_INUM0, SCM_OVFLOW, "dbl2big");
|
||||||
return ans;
|
return ans;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3852,7 +3852,7 @@ scm_ulong2num(sl)
|
||||||
unsigned long sl;
|
unsigned long sl;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (!SCM_POSSCM_FIXABLE(sl)) {
|
if (!SCM_POSFIXABLE(sl)) {
|
||||||
#ifdef SCM_BIGDIG
|
#ifdef SCM_BIGDIG
|
||||||
return scm_ulong2big(sl);
|
return scm_ulong2big(sl);
|
||||||
#else
|
#else
|
||||||
|
@ -3995,7 +3995,7 @@ scm_num2long_long(num, pos, s_caller)
|
||||||
scm_sizet l = SCM_NUMDIGS(num);
|
scm_sizet l = SCM_NUMDIGS(num);
|
||||||
SCM_ASRTGO(SCM_DIGSPERLONGLONG >= l, errout);
|
SCM_ASRTGO(SCM_DIGSPERLONGLONG >= l, errout);
|
||||||
res = 0;
|
res = 0;
|
||||||
for(;l--;) res = SCM_LONGLONGSCM_BIGUP(res) + SCM_BDIGITS(num)[l];
|
for(;l--;) res = SCM_LONGLONGBIGUP(res) + SCM_BDIGITS(num)[l];
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue