[uim-commit] r1701 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Fri Sep 30 08:42:47 PDT 2005
Author: yamaken
Date: 2005-09-30 08:42:42 -0700 (Fri, 30 Sep 2005)
New Revision: 1701
Modified:
branches/r5rs/sigscheme/config.h
branches/r5rs/sigscheme/operations.c
branches/r5rs/sigscheme/sigscheme.c
branches/r5rs/sigscheme/sigscheme.h
Log:
* sigscheme/config.h
- (SCM_USE_DEEP_CADRS): New macro
* sigscheme/sigscheme.h
- Enclose the deep c[ad]+rs into #if SCM_USE_DEEP_CADRS
* sigscheme/operations.c
- Ditto
* sigscheme/sigscheme.c
- (SigScm_Initialize_internal): Ditto
Modified: branches/r5rs/sigscheme/config.h
===================================================================
--- branches/r5rs/sigscheme/config.h 2005-09-30 15:22:51 UTC (rev 1700)
+++ branches/r5rs/sigscheme/config.h 2005-09-30 15:42:42 UTC (rev 1701)
@@ -53,6 +53,7 @@
General Extensions
===========================================================================*/
#define SCM_USE_NONSTD_FEATURES 1 /* use Non-R5RS standard features such as "require" */
+#define SCM_USE_DEEP_CADRS 1 /* use all c[ad]+r defined in R5RS */
/*===========================================================================
SIOD (Scheme In One Defun) Compatiblity
Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c 2005-09-30 15:22:51 UTC (rev 1700)
+++ branches/r5rs/sigscheme/operations.c 2005-09-30 15:42:42 UTC (rev 1701)
@@ -664,6 +664,16 @@
{
return ScmOp_cdr( ScmOp_cdr(lst) );
}
+ScmObj ScmOp_caddr(ScmObj lst)
+{
+ return ScmOp_car( ScmOp_cdr( ScmOp_cdr(lst) ));
+}
+ScmObj ScmOp_cdddr(ScmObj lst)
+{
+ return ScmOp_cdr( ScmOp_cdr( ScmOp_cdr(lst) ));
+}
+
+#if SCM_USE_DEEP_CADRS
ScmObj ScmOp_caaar(ScmObj lst)
{
return ScmOp_car( ScmOp_car( ScmOp_car(lst) ));
@@ -676,10 +686,6 @@
{
return ScmOp_car( ScmOp_cdr( ScmOp_car(lst) ));
}
-ScmObj ScmOp_caddr(ScmObj lst)
-{
- return ScmOp_car( ScmOp_cdr( ScmOp_cdr(lst) ));
-}
ScmObj ScmOp_cdaar(ScmObj lst)
{
return ScmOp_cdr( ScmOp_car( ScmOp_car(lst) ));
@@ -692,10 +698,6 @@
{
return ScmOp_cdr( ScmOp_cdr( ScmOp_car(lst) ));
}
-ScmObj ScmOp_cdddr(ScmObj lst)
-{
- return ScmOp_cdr( ScmOp_cdr( ScmOp_cdr(lst) ));
-}
ScmObj ScmOp_caaaar(ScmObj lst)
{
return ScmOp_car( ScmOp_car( ScmOp_car( ScmOp_car(lst) )));
@@ -760,6 +762,7 @@
{
return ScmOp_cdr( ScmOp_cdr( ScmOp_cdr( ScmOp_cdr(lst) )));
}
+#endif /* SCM_USE_DEEP_CADRS */
ScmObj ScmOp_list(ScmObj args)
{
Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c 2005-09-30 15:22:51 UTC (rev 1700)
+++ branches/r5rs/sigscheme/sigscheme.c 2005-09-30 15:42:42 UTC (rev 1701)
@@ -217,14 +217,15 @@
Scm_RegisterProcedureFixed1("cadr" , ScmOp_cadr);
Scm_RegisterProcedureFixed1("cdar" , ScmOp_cdar);
Scm_RegisterProcedureFixed1("cddr" , ScmOp_cddr);
+ Scm_RegisterProcedureFixed1("caddr" , ScmOp_caddr);
+ Scm_RegisterProcedureFixed1("cdddr" , ScmOp_cdddr);
+#if SCM_USE_DEEP_CADRS
Scm_RegisterProcedureFixed1("caaar" , ScmOp_caaar);
Scm_RegisterProcedureFixed1("caadr" , ScmOp_caadr);
Scm_RegisterProcedureFixed1("cadar" , ScmOp_cadar);
- Scm_RegisterProcedureFixed1("caddr" , ScmOp_caddr);
Scm_RegisterProcedureFixed1("cdaar" , ScmOp_cdaar);
Scm_RegisterProcedureFixed1("cdadr" , ScmOp_cdadr);
Scm_RegisterProcedureFixed1("cddar" , ScmOp_cddar);
- Scm_RegisterProcedureFixed1("cdddr" , ScmOp_cdddr);
Scm_RegisterProcedureFixed1("caaaar" , ScmOp_caaaar);
Scm_RegisterProcedureFixed1("caaadr" , ScmOp_caaadr);
Scm_RegisterProcedureFixed1("caadar" , ScmOp_caadar);
@@ -241,6 +242,7 @@
Scm_RegisterProcedureFixed1("cddadr" , ScmOp_cddadr);
Scm_RegisterProcedureFixed1("cdddar" , ScmOp_cdddar);
Scm_RegisterProcedureFixed1("cddddr" , ScmOp_cddddr);
+#endif /* SCM_USE_DEEP_CADRS */
Scm_RegisterProcedureFixed1("null?" , ScmOp_nullp);
Scm_RegisterProcedureFixed1("list?" , ScmOp_listp);
Scm_RegisterProcedureFixed1("length" , ScmOp_length);
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-09-30 15:22:51 UTC (rev 1700)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-09-30 15:42:42 UTC (rev 1701)
@@ -426,14 +426,15 @@
ScmObj ScmOp_cadr(ScmObj lst);
ScmObj ScmOp_cdar(ScmObj lst);
ScmObj ScmOp_cddr(ScmObj lst);
+ScmObj ScmOp_caddr(ScmObj lst);
+ScmObj ScmOp_cdddr(ScmObj lst);
+#if SCM_USE_DEEP_CADRS
ScmObj ScmOp_caaar(ScmObj lst);
ScmObj ScmOp_caadr(ScmObj lst);
ScmObj ScmOp_cadar(ScmObj lst);
-ScmObj ScmOp_caddr(ScmObj lst);
ScmObj ScmOp_cdaar(ScmObj lst);
ScmObj ScmOp_cdadr(ScmObj lst);
ScmObj ScmOp_cddar(ScmObj lst);
-ScmObj ScmOp_cdddr(ScmObj lst);
ScmObj ScmOp_caaaar(ScmObj lst);
ScmObj ScmOp_caaadr(ScmObj lst);
ScmObj ScmOp_caadar(ScmObj lst);
@@ -450,6 +451,7 @@
ScmObj ScmOp_cddadr(ScmObj lst);
ScmObj ScmOp_cdddar(ScmObj lst);
ScmObj ScmOp_cddddr(ScmObj lst);
+#endif /* SCM_USE_DEEP_CADRS */
ScmObj ScmOp_list(ScmObj args);
ScmObj ScmOp_nullp(ScmObj obj);
ScmObj ScmOp_listp(ScmObj obj);
More information about the uim-commit
mailing list