mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
* eval.c, lang.c, lang.h (scm_lisp_nil, scm_lisp_t): Renamed from
scm_nil, scm_t. (Thanks to Dirk Herrmann.)
This commit is contained in:
parent
5ebf0091ec
commit
43a912cfa6
3 changed files with 25 additions and 25 deletions
|
@ -1065,8 +1065,8 @@ scm_m_cont (SCM xorig, SCM env)
|
|||
|
||||
/* Multi-language support */
|
||||
|
||||
SCM scm_nil;
|
||||
SCM scm_t;
|
||||
SCM scm_lisp_nil;
|
||||
SCM scm_lisp_t;
|
||||
|
||||
SCM_SYNTAX (s_nil_cond, "nil-cond", scm_makmmacro, scm_m_nil_cond);
|
||||
|
||||
|
@ -2356,7 +2356,7 @@ dispatch:
|
|||
while (SCM_NIMP (x = SCM_CDR (proc)))
|
||||
{
|
||||
if (!(SCM_FALSEP (t.arg1 = EVALCAR (proc, env))
|
||||
|| t.arg1 == scm_nil))
|
||||
|| t.arg1 == scm_lisp_nil))
|
||||
{
|
||||
if (SCM_CAR (x) == SCM_UNSPECIFIED)
|
||||
RETURN (t.arg1);
|
||||
|
@ -2372,12 +2372,12 @@ dispatch:
|
|||
case (SCM_ISYMNUM (SCM_IM_NIL_IFY)):
|
||||
x = SCM_CDR (x);
|
||||
RETURN ((SCM_FALSEP (proc = EVALCAR (x, env)) || SCM_NULLP (proc))
|
||||
? scm_nil
|
||||
? scm_lisp_nil
|
||||
: proc)
|
||||
|
||||
case (SCM_ISYMNUM (SCM_IM_T_IFY)):
|
||||
x = SCM_CDR (x);
|
||||
RETURN (SCM_NFALSEP (EVALCAR (x, env)) ? scm_t : scm_nil)
|
||||
RETURN (SCM_NFALSEP (EVALCAR (x, env)) ? scm_lisp_t : scm_lisp_nil)
|
||||
|
||||
case (SCM_ISYMNUM (SCM_IM_0_COND)):
|
||||
proc = SCM_CDR (x);
|
||||
|
@ -3863,12 +3863,12 @@ scm_init_eval ()
|
|||
scm_sym_unquote = SCM_CAR (scm_sysintern ("unquote", SCM_UNDEFINED));
|
||||
scm_sym_uq_splicing = SCM_CAR (scm_sysintern ("unquote-splicing", SCM_UNDEFINED));
|
||||
|
||||
scm_nil = scm_sysintern ("nil", SCM_UNDEFINED);
|
||||
SCM_SETCDR (scm_nil, SCM_CAR (scm_nil));
|
||||
scm_nil = SCM_CAR (scm_nil);
|
||||
scm_t = scm_sysintern ("t", SCM_UNDEFINED);
|
||||
SCM_SETCDR (scm_t, SCM_CAR (scm_t));
|
||||
scm_t = SCM_CAR (scm_t);
|
||||
scm_lisp_nil = scm_sysintern ("nil", SCM_UNDEFINED);
|
||||
SCM_SETCDR (scm_lisp_nil, SCM_CAR (scm_lisp_nil));
|
||||
scm_lisp_nil = SCM_CAR (scm_lisp_nil);
|
||||
scm_lisp_t = scm_sysintern ("t", SCM_UNDEFINED);
|
||||
SCM_SETCDR (scm_lisp_t, SCM_CAR (scm_lisp_t));
|
||||
scm_lisp_t = SCM_CAR (scm_lisp_t);
|
||||
|
||||
/* acros */
|
||||
/* end of acros */
|
||||
|
|
|
@ -83,7 +83,7 @@ SCM_DEFINE (scm_nil_car, "nil-car", 1, 0, 0,
|
|||
#define FUNC_NAME s_scm_nil_car
|
||||
{
|
||||
if (SCM_NILP (x))
|
||||
return scm_nil;
|
||||
return scm_lisp_nil;
|
||||
SCM_VALIDATE_CONS (1,x);
|
||||
return SCM_CAR (x);
|
||||
}
|
||||
|
@ -95,20 +95,20 @@ SCM_DEFINE (scm_nil_cdr, "nil-cdr", 1, 0, 0,
|
|||
#define FUNC_NAME s_scm_nil_cdr
|
||||
{
|
||||
if (SCM_NILP (x))
|
||||
return scm_nil;
|
||||
return scm_lisp_nil;
|
||||
SCM_VALIDATE_CONS (1,x);
|
||||
return SCM_EOL2NIL (SCM_CDR (x), x);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
/* GJB:FIXME:: why does this return scm_nil instead of SCM_BOOL_F?
|
||||
/* GJB:FIXME:: why does this return scm_lisp_nil instead of SCM_BOOL_F?
|
||||
Could use SCM_BOOL, below, otherwise */
|
||||
SCM_DEFINE (scm_null, "null", 1, 0, 0,
|
||||
(SCM x),
|
||||
"")
|
||||
#define FUNC_NAME s_scm_null
|
||||
{
|
||||
return (SCM_NILP (x) || SCM_NULLP (x) || SCM_FALSEP (x)) ? scm_t : scm_nil;
|
||||
return (SCM_NILP (x) || SCM_NULLP (x) || SCM_FALSEP (x)) ? scm_lisp_t : scm_lisp_nil;
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
@ -126,10 +126,10 @@ scm_m_while (SCM exp, SCM env)
|
|||
}
|
||||
z = scm_eval_car (x = exp, env);
|
||||
}
|
||||
return scm_nil;
|
||||
return scm_lisp_nil;
|
||||
}
|
||||
|
||||
/* GJB:FIXME:: why does this return scm_nil instead of SCM_BOOL_F?
|
||||
/* GJB:FIXME:: why does this return scm_lisp_nil instead of SCM_BOOL_F?
|
||||
Could use SCM_BOOL, below, otherwise */
|
||||
SCM_DEFINE1 (scm_nil_eq, "nil-eq", scm_tc7_rpsubr,
|
||||
(SCM x, SCM y),
|
||||
|
@ -139,8 +139,8 @@ SCM_DEFINE1 (scm_nil_eq, "nil-eq", scm_tc7_rpsubr,
|
|||
return (((x==y)
|
||||
|| (SCM_NILP (x) && (SCM_NULLP (y) || SCM_FALSEP (y)))
|
||||
|| (SCM_NILP (y) && (SCM_NULLP (x) || SCM_FALSEP (x))))
|
||||
? scm_t
|
||||
: scm_nil);
|
||||
? scm_lisp_t
|
||||
: scm_lisp_nil);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
|
|
@ -48,15 +48,15 @@
|
|||
|
||||
|
||||
|
||||
extern SCM scm_nil;
|
||||
extern SCM scm_t;
|
||||
extern SCM scm_lisp_nil;
|
||||
extern SCM scm_lisp_t;
|
||||
|
||||
#define SCM_NILP(x) ((x) == scm_nil)
|
||||
#define SCM_NILP(x) ((x) == scm_lisp_nil)
|
||||
#define SCM_NILNULLP(x) (SCM_NILP (x) || SCM_NULLP (x))
|
||||
#define SCM_NIL2EOL(x, tmp) ((tmp = (x)) == scm_nil ? SCM_EOL : tmp)
|
||||
#define SCM_EOL2NIL(x, tmp) (SCM_NULLP (tmp = (x)) ? scm_nil : tmp)
|
||||
#define SCM_NIL2EOL(x, tmp) ((tmp = (x)) == scm_lisp_nil ? SCM_EOL : tmp)
|
||||
#define SCM_EOL2NIL(x, tmp) (SCM_NULLP (tmp = (x)) ? scm_lisp_nil : tmp)
|
||||
#define SCM_EOL_IFY(x, tmp) (tmp = (x), SCM_NILP (tmp) ? SCM_EOL : tmp)
|
||||
#define SCM_NIL_IFY(x, tmp) (tmp = (x), SCM_NILP (tmp) ? scm_nil : tmp)
|
||||
#define SCM_NIL_IFY(x, tmp) (tmp = (x), SCM_NILP (tmp) ? scm_lisp_nil : tmp)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue