From 555048c1462dceef357eea60727ff5c9c614d12c Mon Sep 17 00:00:00 2001 From: OGINO Masanori Date: Fri, 26 Jun 2015 15:07:24 +0900 Subject: [PATCH] Implement SRFI 0. Reference: http://srfi.schemers.org/srfi-0/ Signed-off-by: OGINO Masanori --- contrib/40.srfi/nitro.mk | 7 +++++-- contrib/40.srfi/src/0.c | 16 ++++++++++++++++ contrib/40.srfi/srfi/0.scm | 3 +++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 contrib/40.srfi/src/0.c create mode 100644 contrib/40.srfi/srfi/0.scm diff --git a/contrib/40.srfi/nitro.mk b/contrib/40.srfi/nitro.mk index c5fcc36d..e0e2a63e 100644 --- a/contrib/40.srfi/nitro.mk +++ b/contrib/40.srfi/nitro.mk @@ -1,5 +1,6 @@ -CONTRIB_INITS += socket +CONTRIB_INITS += features socket CONTRIB_LIBS += \ + contrib/40.srfi/srfi/0.scm\ contrib/40.srfi/srfi/1.scm\ contrib/40.srfi/srfi/8.scm\ contrib/40.srfi/srfi/17.scm\ @@ -9,7 +10,9 @@ CONTRIB_LIBS += \ contrib/40.srfi/srfi/95.scm\ contrib/40.srfi/srfi/106.scm\ contrib/40.srfi/srfi/111.scm -CONTRIB_SRCS += contrib/40.srfi/src/106.c +CONTRIB_SRCS += \ + contrib/40.srfi/src/0.c\ + contrib/40.srfi/src/106.c CONTRIB_TESTS += test-srfi test-srfi: bin/picrin diff --git a/contrib/40.srfi/src/0.c b/contrib/40.srfi/src/0.c new file mode 100644 index 00000000..6d6124bc --- /dev/null +++ b/contrib/40.srfi/src/0.c @@ -0,0 +1,16 @@ +#include "picrin.h" + +void +pic_init_features(pic_state *pic) +{ + pic_add_feature(pic, "srfi-0"); + pic_add_feature(pic, "srfi-1"); + pic_add_feature(pic, "srfi-8"); + pic_add_feature(pic, "srfi-17"); + pic_add_feature(pic, "srfi-26"); + pic_add_feature(pic, "srfi-43"); + pic_add_feature(pic, "srfi-60"); + pic_add_feature(pic, "srfi-95"); + pic_add_feature(pic, "srfi-106"); + pic_add_feature(pic, "srfi-111"); +} diff --git a/contrib/40.srfi/srfi/0.scm b/contrib/40.srfi/srfi/0.scm new file mode 100644 index 00000000..bb1a90fb --- /dev/null +++ b/contrib/40.srfi/srfi/0.scm @@ -0,0 +1,3 @@ +(define-library (srfi 0) + (import (scheme base)) + (export cond-expand))