[uim-commit] r3006 - in branches/r5rs/sigscheme/src: . script
yamaken at freedesktop.org
yamaken at freedesktop.org
Fri Jan 27 16:09:57 PST 2006
Author: yamaken
Date: 2006-01-27 16:09:53 -0800 (Fri, 27 Jan 2006)
New Revision: 3006
Modified:
branches/r5rs/sigscheme/src/Makefile.am
branches/r5rs/sigscheme/src/error.c
branches/r5rs/sigscheme/src/operations-nonstd.c
branches/r5rs/sigscheme/src/operations-siod.c
branches/r5rs/sigscheme/src/operations-srfi1.c
branches/r5rs/sigscheme/src/operations-srfi2.c
branches/r5rs/sigscheme/src/operations-srfi23.c
branches/r5rs/sigscheme/src/operations-srfi34.c
branches/r5rs/sigscheme/src/operations-srfi38.c
branches/r5rs/sigscheme/src/operations-srfi6.c
branches/r5rs/sigscheme/src/operations-srfi60.c
branches/r5rs/sigscheme/src/operations-srfi8.c
branches/r5rs/sigscheme/src/script/build_func_table.rb
branches/r5rs/sigscheme/src/sigscheme.c
branches/r5rs/sigscheme/src/sigschemefunctable.h
branches/r5rs/sigscheme/src/syntax.c
Log:
* sigscheme/src/sigschemefunctable.h
- Add lacking extern "C" decl
- (REGISTER_FUNC_TABLE, SCM_REGISTER_FUNC_TABLE): Rename
REGISTER_FUNC_TABLE to SCM_REGISTER_FUNC_TABLE for future user
extension
- (struct builtin_func_info, struct scm_func_registration_info):
Rename struct builtin_func_info to struct
scm_func_registration_info for future user extension
- (scm_error_func_info_table): Remove #if SCM_USE_NONSTD_FEATURES
- (scm_new_srfi34_func_info_table, scm_srfi34_func_info_table):
Rename scm_new_srfi34_func_info_table to scm_srfi34_func_info_table
- (r5rs_syntax_func_info_table, r5rs_procedure_func_info_table,
r5rs_deepcadrs_func_info_table, nonstd_func_info_table,
srfi1_func_info_table, srfi2_func_info_table,
srfi6_func_info_table, srfi8_func_info_table,
srfi23_func_info_table, srfi38_func_info_table,
srfi60_func_info_table, siod_func_info_table): Prepend 'scm_'
prefix to fix namespace pollution of global symbols
- (scm_r5rs_syntax_func_info_table,
scm_r5rs_procedure_func_info_table,
scm_r5rs_deepcadrs_func_info_table, scm_nonstd_func_info_table,
scm_srfi1_func_info_table, scm_srfi2_func_info_table,
scm_srfi6_func_info_table, scm_srfi8_func_info_table,
scm_srfi23_func_info_table, scm_srfi38_func_info_table,
scm_srfi60_func_info_table, scm_siod_func_info_table): Renamed
from above
* sigscheme/src/Makefile.am
- Follow the renamings in the rules for sigschemefunctable-*.c
* sigscheme/src/script/build_func_table.rb
- (print_tableheader): Follow the renaming of struct
builtin_func_info
* sigscheme/src/sigscheme.c
- (scm_initialize_internal): Follow the renamings
* sigscheme/src/error.c
- (scm_init_error): Ditto
* sigscheme/src/syntax.c
- (scm_init_syntax): Ditto
* sigscheme/src/operations-nonstd.c
- (scm_initialize_nonstd_features): Ditto
* sigscheme/src/operations-siod.c
- (scm_initialize_siod): Ditto
* sigscheme/src/operations-srfi1.c
- (scm_initialize_srfi1): Ditto
* sigscheme/src/operations-srfi2.c
- (scm_initialize_srfi2): Ditto
* sigscheme/src/operations-srfi6.c
- (scm_initialize_srfi6): Ditto
* sigscheme/src/operations-srfi8.c
- (scm_initialize_srfi8): Ditto
* sigscheme/src/operations-srfi23.c
- (scm_initialize_srfi23): Ditto
* sigscheme/src/operations-srfi34.c
- (scm_initialize_srfi34): Ditto
* sigscheme/src/operations-srfi38.c
- (scm_initialize_srfi38): Ditto
* sigscheme/src/operations-srfi60.c
- (scm_initialize_srfi60):
Modified: branches/r5rs/sigscheme/src/Makefile.am
===================================================================
--- branches/r5rs/sigscheme/src/Makefile.am 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/Makefile.am 2006-01-28 00:09:53 UTC (rev 3006)
@@ -25,34 +25,34 @@
sigschemefunctable.c: $(FUNC_TABLES)
sigschemefunctable-r5rs-syntax.c: syntax.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "r5rs_syntax_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_r5rs_syntax_func_info_table" $< > $@
sigschemefunctable-r5rs-procedure.c: sigscheme.c operations.c eval.c io.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "r5rs_procedure_func_info_table" \
+ $(BUILD_FUNCTBL) "scm_r5rs_procedure_func_info_table" \
sigscheme.c operations.c eval.c io.c > $@
sigschemefunctable-r5rs-deepcadrs.c: operations-r5rs-deepcadrs.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "r5rs_deepcadrs_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_r5rs_deepcadrs_func_info_table" $< > $@
sigschemefunctable-error.c: error.c $(BUILD_FUNCTBL_SOURCES)
$(BUILD_FUNCTBL) "scm_error_func_info_table" $< > $@
sigschemefunctable-nonstd.c: operations-nonstd.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "nonstd_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_nonstd_func_info_table" $< > $@
sigschemefunctable-srfi1.c: operations-srfi1.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "srfi1_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_srfi1_func_info_table" $< > $@
sigschemefunctable-srfi2.c: operations-srfi2.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "srfi2_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_srfi2_func_info_table" $< > $@
sigschemefunctable-srfi6.c: operations-srfi6.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "srfi6_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_srfi6_func_info_table" $< > $@
sigschemefunctable-srfi8.c: operations-srfi8.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "srfi8_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_srfi8_func_info_table" $< > $@
sigschemefunctable-srfi23.c: operations-srfi23.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "srfi23_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_srfi23_func_info_table" $< > $@
sigschemefunctable-srfi34.c: operations-srfi34.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "scm_new_srfi34_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_srfi34_func_info_table" $< > $@
sigschemefunctable-srfi38.c: operations-srfi38.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "srfi38_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_srfi38_func_info_table" $< > $@
sigschemefunctable-srfi60.c: operations-srfi60.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "srfi60_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_srfi60_func_info_table" $< > $@
sigschemefunctable-siod.c: operations-siod.c $(BUILD_FUNCTBL_SOURCES)
- $(BUILD_FUNCTBL) "siod_func_info_table" $< > $@
+ $(BUILD_FUNCTBL) "scm_siod_func_info_table" $< > $@
EXTRA_DIST = $(FUNC_TABLES) $(BUILD_FUNCTBL_SOURCES) \
storage-fatty.h storage-compact.h
Modified: branches/r5rs/sigscheme/src/error.c
===================================================================
--- branches/r5rs/sigscheme/src/error.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/error.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -90,7 +90,7 @@
cb_fatal_error = NULL;
fatal_error_looped = scm_false;
- REGISTER_FUNC_TABLE(scm_error_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_error_func_info_table);
}
int
Modified: branches/r5rs/sigscheme/src/operations-nonstd.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-nonstd.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-nonstd.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -70,7 +70,7 @@
void
scm_initialize_nonstd_features(void)
{
- REGISTER_FUNC_TABLE(nonstd_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_nonstd_func_info_table);
scm_define_alias("call/cc", "call-with-current-continuation");
}
Modified: branches/r5rs/sigscheme/src/operations-siod.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-siod.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-siod.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -98,7 +98,7 @@
scm_initialize_siod(void)
{
ScmCharPort *cport;
- REGISTER_FUNC_TABLE(siod_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_siod_func_info_table);
scm_use("srfi-60");
scm_define_alias("bit-and", "logand");
Modified: branches/r5rs/sigscheme/src/operations-srfi1.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi1.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-srfi1.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -70,10 +70,7 @@
void
scm_initialize_srfi1(void)
{
- /*=======================================================================
- SRFI-1 Procedures
- =======================================================================*/
- REGISTER_FUNC_TABLE(srfi1_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_srfi1_func_info_table);
}
/*==============================================================================
Modified: branches/r5rs/sigscheme/src/operations-srfi2.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi2.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-srfi2.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -65,7 +65,7 @@
void
scm_initialize_srfi2(void)
{
- REGISTER_FUNC_TABLE(srfi2_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_srfi2_func_info_table);
}
ScmObj
Modified: branches/r5rs/sigscheme/src/operations-srfi23.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi23.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-srfi23.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -63,7 +63,7 @@
void
scm_initialize_srfi23(void)
{
- REGISTER_FUNC_TABLE(srfi23_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_srfi23_func_info_table);
}
/*=============================================================================
Modified: branches/r5rs/sigscheme/src/operations-srfi34.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi34.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-srfi34.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -186,7 +186,7 @@
SCM_INTERACTION_ENV);
#endif /* USE_WITH_SIGSCHEME_FATAL_ERROR */
- REGISTER_FUNC_TABLE(scm_new_srfi34_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_srfi34_func_info_table);
current_exception_handlers = LIST_1(proc_fallback_handler);
}
Modified: branches/r5rs/sigscheme/src/operations-srfi38.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi38.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-srfi38.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -62,7 +62,7 @@
void
scm_initialize_srfi38(void)
{
- REGISTER_FUNC_TABLE(srfi38_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_srfi38_func_info_table);
/* SRFI-38 allows providing (read/ss) and (write/ss) */
scm_define_alias("write/ss", "write-with-shared-structure");
Modified: branches/r5rs/sigscheme/src/operations-srfi6.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi6.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-srfi6.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -70,7 +70,7 @@
{
scm_strport_init();
- REGISTER_FUNC_TABLE(srfi6_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_srfi6_func_info_table);
}
static void
Modified: branches/r5rs/sigscheme/src/operations-srfi60.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi60.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-srfi60.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -85,7 +85,7 @@
void
scm_initialize_srfi60(void)
{
- REGISTER_FUNC_TABLE(srfi60_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_srfi60_func_info_table);
scm_define_alias("bitwise-and", "logand");
scm_define_alias("bitwise-ior", "logior");
Modified: branches/r5rs/sigscheme/src/operations-srfi8.c
===================================================================
--- branches/r5rs/sigscheme/src/operations-srfi8.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/operations-srfi8.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -63,7 +63,7 @@
void
scm_initialize_srfi8(void)
{
- REGISTER_FUNC_TABLE(srfi8_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_srfi8_func_info_table);
}
ScmObj
Modified: branches/r5rs/sigscheme/src/script/build_func_table.rb
===================================================================
--- branches/r5rs/sigscheme/src/script/build_func_table.rb 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/script/build_func_table.rb 2006-01-28 00:09:53 UTC (rev 3006)
@@ -52,7 +52,7 @@
end
def print_tableheader(tablename)
- puts "struct builtin_func_info #{tablename}[] = {"
+ puts "struct scm_func_registration_info #{tablename}[] = {"
end
def print_tablefooter()
Modified: branches/r5rs/sigscheme/src/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/src/sigscheme.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/sigscheme.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -173,11 +173,11 @@
scm_init_syntax();
/* R5RS Procedures */
- REGISTER_FUNC_TABLE(r5rs_procedure_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_r5rs_procedure_func_info_table);
#if SCM_USE_DEEP_CADRS
/* Deep c[ad]+r Functions */
- REGISTER_FUNC_TABLE(r5rs_deepcadrs_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_r5rs_deepcadrs_func_info_table);
#endif
#if SCM_USE_NONSTD_FEATURES
scm_use("sscm");
Modified: branches/r5rs/sigscheme/src/sigschemefunctable.h
===================================================================
--- branches/r5rs/sigscheme/src/sigschemefunctable.h 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/sigschemefunctable.h 2006-01-28 00:09:53 UTC (rev 3006)
@@ -34,6 +34,12 @@
#ifndef __SIGSCHEME_FUNCTABLE_H
#define __SIGSCHEME_FUNCTABLE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "config.h"
+
/*=======================================
System Include
=======================================*/
@@ -45,12 +51,12 @@
/*=======================================
Macro Definitions
=======================================*/
-#define REGISTER_FUNC_TABLE(functable) \
- do { \
- struct builtin_func_info *info = NULL; \
- for (info = functable; info->funcname; info++) { \
- (*info->reg_func)(info->funcname, info->c_func); \
- } \
+#define SCM_REGISTER_FUNC_TABLE(functable) \
+ do { \
+ struct scm_func_registration_info *info = NULL; \
+ for (info = functable; info->funcname; info++) { \
+ (*info->reg_func)(info->funcname, info->c_func); \
+ } \
} while (/* CONSTCOND */ 0)
/*=======================================
@@ -59,7 +65,7 @@
typedef ScmObj (*ScmBuiltinFunc)(void);
typedef void (*ScmRegisterFunc)(const char *name, ScmBuiltinFunc func);
-struct builtin_func_info {
+struct scm_func_registration_info {
const char *funcname;
ScmBuiltinFunc c_func;
ScmRegisterFunc reg_func;
@@ -68,44 +74,46 @@
/*=======================================
Variable Declarations
=======================================*/
-extern struct builtin_func_info r5rs_syntax_func_info_table[];
-extern struct builtin_func_info r5rs_procedure_func_info_table[];
+extern struct scm_func_registration_info scm_r5rs_syntax_func_info_table[];
+extern struct scm_func_registration_info scm_r5rs_procedure_func_info_table[];
+extern struct scm_func_registration_info scm_error_func_info_table[];
#if SCM_USE_DEEP_CADRS
-extern struct builtin_func_info r5rs_deepcadrs_func_info_table[];
+extern struct scm_func_registration_info scm_r5rs_deepcadrs_func_info_table[];
#endif
#if SCM_USE_NONSTD_FEATURES
-extern struct builtin_func_info nonstd_func_info_table[];
+extern struct scm_func_registration_info scm_nonstd_func_info_table[];
#endif
-#if SCM_USE_NONSTD_FEATURES
-extern struct builtin_func_info scm_error_func_info_table[];
-#endif
#if SCM_USE_SRFI1
-extern struct builtin_func_info srfi1_func_info_table[];
+extern struct scm_func_registration_info scm_srfi1_func_info_table[];
#endif
#if SCM_USE_SRFI2
-extern struct builtin_func_info srfi2_func_info_table[];
+extern struct scm_func_registration_info scm_srfi2_func_info_table[];
#endif
#if SCM_USE_SRFI6
-extern struct builtin_func_info srfi6_func_info_table[];
+extern struct scm_func_registration_info scm_srfi6_func_info_table[];
#endif
#if SCM_USE_SRFI8
-extern struct builtin_func_info srfi8_func_info_table[];
+extern struct scm_func_registration_info scm_srfi8_func_info_table[];
#endif
#if SCM_USE_SRFI23
-extern struct builtin_func_info srfi23_func_info_table[];
+extern struct scm_func_registration_info scm_srfi23_func_info_table[];
#endif
#if SCM_USE_SRFI34
-extern struct builtin_func_info scm_new_srfi34_func_info_table[];
+extern struct scm_func_registration_info scm_srfi34_func_info_table[];
#endif
#if SCM_USE_SRFI38
-extern struct builtin_func_info srfi38_func_info_table[];
+extern struct scm_func_registration_info scm_srfi38_func_info_table[];
#endif
#if SCM_USE_SRFI60
-extern struct builtin_func_info srfi60_func_info_table[];
+extern struct scm_func_registration_info scm_srfi60_func_info_table[];
#endif
#if SCM_COMPAT_SIOD
-extern struct builtin_func_info siod_func_info_table[];
+extern struct scm_func_registration_info scm_siod_func_info_table[];
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __SIGSCHEME_FUNCTABLE_H */
Modified: branches/r5rs/sigscheme/src/syntax.c
===================================================================
--- branches/r5rs/sigscheme/src/syntax.c 2006-01-27 23:44:11 UTC (rev 3005)
+++ branches/r5rs/sigscheme/src/syntax.c 2006-01-28 00:09:53 UTC (rev 3006)
@@ -79,7 +79,7 @@
void
scm_init_syntax(void)
{
- REGISTER_FUNC_TABLE(r5rs_syntax_func_info_table);
+ SCM_REGISTER_FUNC_TABLE(scm_r5rs_syntax_func_info_table);
sym_else = scm_intern("else");
sym_yields = scm_intern("=>");
More information about the uim-commit
mailing list