[uim-commit] r1411 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Sun Sep 4 11:29:11 PDT 2005
Author: yamaken
Date: 2005-09-04 11:29:09 -0700 (Sun, 04 Sep 2005)
New Revision: 1411
Modified:
branches/r5rs/sigscheme/sigscheme.h
branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* sigscheme/sigscheme.h
- (SCM_CONS): New macro conforms to [Anthy-dev 2293]
- (SCM_LIST_1, SCM_LIST_2, SCM_LIST_3, SCM_LIST_4, SCM_LIST_5):
* Moved from sigschemeinternal.h
* Simplify
* sigscheme/sigschemeinternal.h
- (SCM_LIST_1, SCM_LIST_2, SCM_LIST_3, SCM_LIST_4, SCM_LIST_5): Move
to sigscheme.h
- (CONS, LIST_1, LIST_2, LIST_3, LIST_4, LIST_5): New abbreviation
macro
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-09-04 18:05:58 UTC (rev 1410)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-09-04 18:29:09 UTC (rev 1411)
@@ -81,6 +81,19 @@
#define SCM_ASSERT(cond) \
(cond ? 0 : SigScm_Die("assertion failed.", __FILE__, __LINE__))
+#define SCM_CONS(kar, kdr) (Scm_NewCons(kar, kdr))
+
+#define SCM_LIST_1(elm1) \
+ (SCM_CONS((elm1), SCM_NULL))
+#define SCM_LIST_2(elm1, elm2) \
+ (SCM_CONS((elm1), SCM_LIST_1(elm2)))
+#define SCM_LIST_3(elm1, elm2, elm3) \
+ (SCM_CONS((elm1), SCM_LIST_2(elm2, elm3)))
+#define SCM_LIST_4(elm1, elm2, elm3, elm4) \
+ (SCM_CONS((elm1), SCM_LIST_3(elm2, elm3, elm4)))
+#define SCM_LIST_5(elm1, elm2, elm3, elm4, elm5) \
+ (SCM_CONS((elm1), SCM_LIST_4(elm2, elm3, elm4, elm5)))
+
/*=======================================
Function Declarations
=======================================*/
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-04 18:05:58 UTC (rev 1410)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-09-04 18:29:09 UTC (rev 1411)
@@ -106,6 +106,13 @@
#define CDAR SCM_CDAR
#define CDDR SCM_CDDR
+#define CONS SCM_CONS
+#define LIST_1 SCM_LIST_1
+#define LIST_2 SCM_LIST_2
+#define LIST_3 SCM_LIST_3
+#define LIST_4 SCM_LIST_4
+#define LIST_5 SCM_LIST_5
+
#define INTP SCM_INTP
#define CONSP SCM_CONSP
#define SYMBOLP SCM_SYMBOLP
@@ -151,28 +158,6 @@
(SCM_NULLP(arg) || SCM_NULLP(SCM_CDR(arg)) || SCM_NULLP(SCM_CDR(SCM_CDR(arg))) \
|| SCM_NULLP(SCM_CDR(SCM_CDR(SCM_CDR(arg)))) || SCM_NULLP(SCM_CDR(SCM_CDR(SCM_CDR(SCM_CDR(arg))))))
-/* Macros For Creating List */
-#define SCM_LIST_1(obj1) \
- (Scm_NewCons((obj1), SCM_NULL))
-#define SCM_LIST_2(obj1, obj2) \
- (Scm_NewCons((obj1), \
- Scm_NewCons((obj2), SCM_NULL)))
-#define SCM_LIST_3(obj1, obj2, obj3) \
- (Scm_NewCons((obj1), \
- Scm_NewCons((obj2), \
- Scm_NewCons((obj3), SCM_NULL))))
-#define SCM_LIST_4(obj1, obj2, obj3, obj4) \
- (Scm_NewCons((obj1), \
- Scm_NewCons((obj2), \
- Scm_NewCons((obj3), \
- Scm_NewCons((obj4), SCM_NULL)))))
-#define SCM_LIST_5(obj1, obj2, obj3, obj4, obj5) \
- (Scm_NewCons((obj1), \
- Scm_NewCons((obj2), \
- Scm_NewCons((obj3), \
- Scm_NewCons((obj4), \
- Scm_NewCons((obj5), SCM_NULL))))))
-
/*=======================================
Function Declarations
=======================================*/
More information about the uim-commit
mailing list