[uim-commit] r2317 - branches/r5rs/sigscheme

yamaken at freedesktop.org yamaken at freedesktop.org
Sat Dec 3 02:12:04 PST 2005


Author: yamaken
Date: 2005-12-03 02:11:59 -0800 (Sat, 03 Dec 2005)
New Revision: 2317

Modified:
   branches/r5rs/sigscheme/sigscheme.h
   branches/r5rs/sigscheme/sigschemeinternal.h
Log:
* sigscheme/sigscheme.h
  - (SCM_LIST_1_P, SCM_LIST_2_P, SCM_LIST_3_P, SCM_LIST_4_P,
    SCM_LIST_5_P): New macro
* sigscheme/sigschemeinternal.h
  - (LIST_1_P, LIST_2_P, LIST_3_P, LIST_4_P, LIST_5_P): New macro


Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h	2005-12-02 06:11:01 UTC (rev 2316)
+++ branches/r5rs/sigscheme/sigscheme.h	2005-12-03 10:11:59 UTC (rev 2317)
@@ -102,6 +102,12 @@
 #define SCM_LIST_5(elm0, elm1, elm2, elm3, elm4) \
     (SCM_CONS((elm0), SCM_LIST_4((elm1), (elm2), (elm3), (elm4))))
 
+#define SCM_LIST_1_P(lst) (SCM_CONSP(lst) && SCM_NULLP(SCM_CDR(lst)))
+#define SCM_LIST_2_P(lst) (SCM_CONSP(lst) && SCM_LIST_1_P(SCM_CDR(lst)))
+#define SCM_LIST_3_P(lst) (SCM_CONSP(lst) && SCM_LIST_2_P(SCM_CDR(lst)))
+#define SCM_LIST_4_P(lst) (SCM_CONSP(lst) && SCM_LIST_3_P(SCM_CDR(lst)))
+#define SCM_LIST_5_P(lst) (SCM_CONSP(lst) && SCM_LIST_4_P(SCM_CDR(lst)))
+
 #define SCM_EVAL(obj, env) (Scm_eval((obj), (env)))
 
 #if SCM_GCC4_READY_GC

Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h	2005-12-02 06:11:01 UTC (rev 2316)
+++ branches/r5rs/sigscheme/sigschemeinternal.h	2005-12-03 10:11:59 UTC (rev 2317)
@@ -141,6 +141,11 @@
 #define LIST_3         SCM_LIST_3
 #define LIST_4         SCM_LIST_4
 #define LIST_5         SCM_LIST_5
+#define LIST_1_P       SCM_LIST_1_P
+#define LIST_2_P       SCM_LIST_2_P
+#define LIST_3_P       SCM_LIST_3_P
+#define LIST_4_P       SCM_LIST_4_P
+#define LIST_5_P       SCM_LIST_5_P
 
 #define DEREF          SCM_DEREF
 #define SET            SCM_SET



More information about the uim-commit mailing list