[uim-commit] r2095 - in branches/r5rs/sigscheme: . script
kzk at freedesktop.org
kzk at freedesktop.org
Tue Nov 8 11:23:39 PST 2005
Author: kzk
Date: 2005-11-08 11:23:34 -0800 (Tue, 08 Nov 2005)
New Revision: 2095
Added:
branches/r5rs/sigscheme/sigschemefunctable.c
Modified:
branches/r5rs/sigscheme/Makefile.am
branches/r5rs/sigscheme/script/build_func_table.rb
branches/r5rs/sigscheme/sigschemefunctable.h
Log:
* Change to generate functable files by each module
* sigscheme/sigschemefunctable.h
- add include guard
- add config flags
* sigscheme/script/build_func_table.rb
- change to see ARGV
* sigscheme/Makefile.am
- change to generate each module's functable file
* sigscheme/sigschemefunctable.c
- new file for including each module's functable file
Modified: branches/r5rs/sigscheme/Makefile.am
===================================================================
--- branches/r5rs/sigscheme/Makefile.am 2005-11-08 19:14:06 UTC (rev 2094)
+++ branches/r5rs/sigscheme/Makefile.am 2005-11-08 19:23:34 UTC (rev 2095)
@@ -1,4 +1,58 @@
noinst_LTLIBRARIES = libsscm.la
+
+FUNC_TABLES = \
+ sigschemefunctable-r5rs.c \
+ sigschemefunctable-r5rs-deepcadrs.c \
+ sigschemefunctable-nonstd.c \
+ sigschemefunctable-siod.c \
+ sigschemefunctable-srfi1.c \
+ sigschemefunctable-srfi2.c \
+ sigschemefunctable-srfi6.c \
+ sigschemefunctable-srfi8.c \
+ sigschemefunctable-srfi23.c \
+ sigschemefunctable-srfi34.c \
+ sigschemefunctable-srfi38.c \
+ sigschemefunctable-srfi60.c
+
+sigschemefunctable.c: $(FUNC_TABLES)
+sigschemefunctable-r5rs.c: ./script/build_func_table.rb sigscheme.c operations.c eval.c io.c
+ ./script/build_func_table.rb "" "r5rs_func_info_table" "sigscheme.c" "operations.c" "eval.c" "io.c" \
+ > sigschemefunctable-r5rs.c
+sigschemefunctable-r5rs-deepcadrs.c: ./script/build_func_table.rb operations-r5rs-deepcadrs.c
+ ./script/build_func_table.rb "" "r5rs_deepcadrs_func_info_table" "operations-r5rs-deepcadrs.c" \
+ > sigschemefunctable-r5rs-deepcadrs.c
+sigschemefunctable-nonstd.c: ./script/build_func_table.rb operations-nonstd.c
+ ./script/build_func_table.rb "" "nonstd_func_info_table" "operations-nonstd.c" \
+ > sigschemefunctable-nonstd.c
+sigschemefunctable-srfi1.c: ./script/build_func_table.rb operations-srfi1.c
+ ./script/build_func_table.rb "_SRFI1_" "srfi1_func_info_table" "operations-srfi1.c" \
+ > sigschemefunctable-srfi1.c
+sigschemefunctable-srfi2.c: ./script/build_func_table.rb operations-srfi2.c
+ ./script/build_func_table.rb "_SRFI2_" "srfi2_func_info_table" "operations-srfi2.c" \
+ > sigschemefunctable-srfi2.c
+sigschemefunctable-srfi6.c: ./script/build_func_table.rb operations-srfi6.c
+ ./script/build_func_table.rb "_SRFI6_" "srfi6_func_info_table" "operations-srfi6.c" \
+ > sigschemefunctable-srfi6.c
+sigschemefunctable-srfi8.c: ./script/build_func_table.rb operations-srfi8.c
+ ./script/build_func_table.rb "_SRFI8_" "srfi8_func_info_table" "operations-srfi8.c" \
+ > sigschemefunctable-srfi8.c
+sigschemefunctable-srfi23.c: ./script/build_func_table.rb operations-srfi23.c
+ ./script/build_func_table.rb "_SRFI23_" "srfi23_func_info_table" "operations-srfi23.c" \
+ > sigschemefunctable-srfi23.c
+sigschemefunctable-srfi34.c: ./script/build_func_table.rb operations-srfi34.c
+ ./script/build_func_table.rb "_SRFI34_" "srfi34_func_info_table" "operations-srfi34.c" \
+ > sigschemefunctable-srfi34.c
+sigschemefunctable-srfi38.c: ./script/build_func_table.rb operations-srfi38.c
+ ./script/build_func_table.rb "_SRFI38_" "srfi38_func_info_table" "operations-srfi38.c" \
+ > sigschemefunctable-srfi38.c
+sigschemefunctable-srfi60.c: ./script/build_func_table.rb operations-srfi60.c
+ ./script/build_func_table.rb "_SRFI60_" "srfi60_func_info_table" "operations-srfi60.c" \
+ > sigschemefunctable-srfi60.c
+sigschemefunctable-siod.c: ./script/build_func_table.rb operations-siod.c
+ ./script/build_func_table.rb "" "siod_func_info_table" "operations-siod.c" \
+ > sigschemefunctable-siod.c
+
+EXTRA_DIST = $(FUNC_TABLES)
libsscm_la_SOURCES = \
storage.c debug.c \
storage-gc.c \
@@ -10,17 +64,6 @@
read.c sigscheme.c sigschemefunctable.c \
sigscheme.h sigschemetype.h sigschemefunctable.h
-EXTRA_DIST = \
- operations-r5rs-deepcadrs.c \
- operations-nonstd.c operations-siod.c \
- operations-srfi1.c operations-srfi2.c \
- operations-srfi6.c operations-srfi8.c \
- operations-srfi23.c operations-srfi34.c \
- operations-srfi38.c operations-srfi60.c
-
-sigschemefunctable.c: ./script/build_func_table.rb operations.c eval.c io.c $(EXTRA_DIST)
- ./script/build_func_table.rb > sigschemefunctable.c
-
libsscm_la_CFLAGS = -Wall
bin_PROGRAMS = sscm
Modified: branches/r5rs/sigscheme/script/build_func_table.rb
===================================================================
--- branches/r5rs/sigscheme/script/build_func_table.rb 2005-11-08 19:14:06 UTC (rev 2094)
+++ branches/r5rs/sigscheme/script/build_func_table.rb 2005-11-08 19:23:34 UTC (rev 2095)
@@ -159,65 +159,10 @@
# Header
print_header
-# R5RS
-build_functable("",
- "r5rs_func_info_table",
- ["eval.c", "io.c", "operations.c", "sigscheme.c"])
+# Print Table
+build_functable(ARGV[0],
+ ARGV[1],
+ ARGV[2..-1])
-# R5RS deep c[ad]+r
-build_functable("",
- "r5rs_deepcadrs_func_info_table",
- ["operations-r5rs-deepcadrs.c"])
-
-# SigScheme specific non standard operations
-build_functable("",
- "nonstd_func_info_table",
- ["operations-nonstd.c"])
-
-# SRFI-1
-build_functable("_SRFI1_",
- "srfi1_func_info_table",
- ["operations-srfi1.c"])
-
-# SRFI-2
-build_functable("_SRFI2_",
- "srfi2_func_info_table",
- ["operations-srfi2.c"])
-
-# SRFI-6
-build_functable("_SRFI6_",
- "srfi6_func_info_table",
- ["operations-srfi6.c"])
-
-# SRFI-8
-build_functable("_SRFI8_",
- "srfi8_func_info_table",
- ["operations-srfi8.c"])
-
-# SRFI-23
-build_functable("_SRFI23_",
- "srfi23_func_info_table",
- ["operations-srfi23.c"])
-
-# SRFI-34
-build_functable("_SRFI34_",
- "srfi34_func_info_table",
- ["operations-srfi34.c"])
-
-# SRFI-38
-build_functable("_SRFI38_",
- "srfi38_func_info_table",
- ["operations-srfi38.c"])
-
-# SRFI-60
-build_functable("_SRFI60_",
- "srfi60_func_info_table",
- ["operations-srfi60.c"])
-
-# SIOD
-build_functable("",
- "siod_func_info_table",
- ["operations-siod.c"])
-
# Footer
print_footer
Added: branches/r5rs/sigscheme/sigschemefunctable.c
===================================================================
--- branches/r5rs/sigscheme/sigschemefunctable.c 2005-11-08 19:14:06 UTC (rev 2094)
+++ branches/r5rs/sigscheme/sigschemefunctable.c 2005-11-08 19:23:34 UTC (rev 2095)
@@ -0,0 +1,90 @@
+/*===========================================================================
+ * FileName : sigschemefunctable.c
+ * About : Built-in function table
+ *
+ * Copyright (C) 2005 by Kazuki Ohta (mover at hct.zaq.ne.jp)
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of authors nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+===========================================================================*/
+
+/*=======================================
+ System Include
+=======================================*/
+
+/*=======================================
+ Local Include
+=======================================*/
+#include "sigscheme.h"
+#include "sigschemefunctable.h"
+
+/*=======================================
+ Macro Definitions
+=======================================*/
+
+/*=======================================
+ Type Definitions
+=======================================*/
+
+/*=======================================
+ Builtin Function Tables
+=======================================*/
+#include "sigschemefunctable-r5rs.c"
+
+#if SCM_USE_DEEP_CADRS
+#include "sigschemefunctable-r5rs-deepcadrs.c"
+#endif
+#if SCM_USE_NONSTD_FEATURES
+#include "sigschemefunctable-nonstd.c"
+#endif
+#if SCM_USE_SRFI1
+#include "sigschemefunctable-srfi1.c"
+#endif
+#if SCM_USE_SRFI2
+#include "sigschemefunctable-srfi2.c"
+#endif
+#if SCM_USE_SRFI6
+#include "sigschemefunctable-srfi6.c"
+#endif
+#if SCM_USE_SRFI8
+#include "sigschemefunctable-srfi8.c"
+#endif
+#if SCM_USE_SRFI23
+#include "sigschemefunctable-srfi23.c"
+#endif
+#if SCM_USE_SRFI34
+#include "sigschemefunctable-srfi34.c"
+#endif
+#if SCM_USE_SRFI38
+#include "sigschemefunctable-srfi38.c"
+#endif
+#if SCM_USE_SRFI60
+#include "sigschemefunctable-srfi60.c"
+#endif
+#if SCM_COMPAT_SIOD
+#include "sigschemefunctable-siod.c"
+#endif
Modified: branches/r5rs/sigscheme/sigschemefunctable.h
===================================================================
--- branches/r5rs/sigscheme/sigschemefunctable.h 2005-11-08 19:14:06 UTC (rev 2094)
+++ branches/r5rs/sigscheme/sigschemefunctable.h 2005-11-08 19:23:34 UTC (rev 2095)
@@ -31,6 +31,8 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===========================================================================*/
+#ifndef __SIGSCHEME_FUNCTABLE_H
+#define __SIGSCHEME_FUNCTABLE_H
/*=======================================
System Include
@@ -67,14 +69,39 @@
Variable Declarations
=======================================*/
extern struct builtin_func_info r5rs_func_info_table[];
+
+#if SCM_USE_DEEP_CADRS
extern struct builtin_func_info r5rs_deepcadrs_func_info_table[];
+#endif
+#if SCM_USE_NONSTD_FEATURES
extern struct builtin_func_info nonstd_func_info_table[];
+#endif
+#if SCM_USE_SRFI1
extern struct builtin_func_info srfi1_func_info_table[];
+#endif
+#if SCM_USE_SRFI2
extern struct builtin_func_info srfi2_func_info_table[];
+#endif
+#if SCM_USE_SRFI6
extern struct builtin_func_info srfi6_func_info_table[];
+#endif
+#if SCM_USE_SRFI8
extern struct builtin_func_info srfi8_func_info_table[];
+#endif
+#if SCM_USE_SRFI23
extern struct builtin_func_info srfi23_func_info_table[];
+#endif
+#if SCM_USE_SRFI34
extern struct builtin_func_info srfi34_func_info_table[];
+#endif
+#if SCM_USE_SRFI38
extern struct builtin_func_info srfi38_func_info_table[];
+#endif
+#if SCM_USE_SRFI60
extern struct builtin_func_info srfi60_func_info_table[];
+#endif
+#if SCM_COMPAT_SIOD
extern struct builtin_func_info siod_func_info_table[];
+#endif
+
+#endif /* __SIGSCHEME_FUNCTABLE_H */
More information about the uim-commit
mailing list