[uim-commit] r1646 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Wed Sep 28 03:59:46 PDT 2005
Author: yamaken
Date: 2005-09-28 03:59:38 -0700 (Wed, 28 Sep 2005)
New Revision: 1646
Modified:
branches/r5rs/sigscheme/debug.c
branches/r5rs/sigscheme/eval.c
branches/r5rs/sigscheme/sigscheme.h
Log:
* sigscheme/sigscheme.h
- (enum ScmDebugCategory): Add SCM_DBG_COMPAT
* sigscheme/debug.c
- (SigScm_PredefinedDebugCategories): Add SCM_DBG_COMPAT
* sigscheme/eval.c
- (SCM_ERRMSG_NON_R5RS_ENV): New macro
- (ScmOp_scheme_report_environment, ScmOp_null_environment):
* Change debug category SCM_DBG_DEVEL to SCM_DBG_COMPAT for the
message
* Produce an error when SCM_STRICT_R5RS
Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c 2005-09-28 10:43:25 UTC (rev 1645)
+++ branches/r5rs/sigscheme/debug.c 2005-09-28 10:59:38 UTC (rev 1646)
@@ -145,7 +145,7 @@
int SigScm_PredefinedDebugCategories(void)
{
#if SCM_DEBUG
- return (SCM_DBG_DEVEL | SCM_DBG_OTHER
+ return (SCM_DBG_DEVEL | SCM_DBG_COMPAT | SCM_DBG_OTHER
#if SCM_DEBUG_PARSER
| SCM_DBG_PARSER
#endif
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-09-28 10:43:25 UTC (rev 1645)
+++ branches/r5rs/sigscheme/eval.c 2005-09-28 10:59:38 UTC (rev 1646)
@@ -69,6 +69,7 @@
#define QQUOTE_IS_VERBATIM(x) (EQ((x), SCM_INVALID))
#define SCM_ERRMSG_WRONG_NR_ARG " Wrong number of arguments "
+#define SCM_ERRMSG_NON_R5RS_ENV " the environment is not conformed to R5RS"
/*=======================================
Variable Declarations
@@ -1451,7 +1452,12 @@
if (SCM_INT_VALUE(version) != 5)
SigScm_ErrorObj("scheme-report-environment : version must be 5 but got ", version);
- CDBG((SCM_DBG_DEVEL, "scheme-report-environment : warning: the environment is not conformed to R5RS"));
+#if SCM_STRICT_R5RS
+ SigScm_Error("scheme-report-environment :" SCM_ERRMSG_NON_R5RS_ENV);
+#else
+ CDBG((SCM_DBG_COMPAT,
+ "scheme-report-environment : warning:" SCM_ERRMSG_NON_R5RS_ENV));
+#endif
return SCM_INTERACTION_ENV;
}
@@ -1464,7 +1470,12 @@
if (SCM_INT_VALUE(version) != 5)
SigScm_ErrorObj("null-environment : version must be 5 but got ", version);
- CDBG((SCM_DBG_DEVEL, "null-environment : warning: the environment is not conformed to R5RS"));
+#if SCM_STRICT_R5RS
+ SigScm_Error("null-environment :" SCM_ERRMSG_NON_R5RS_ENV);
+#else
+ CDBG((SCM_DBG_COMPAT,
+ "null-environment : warning:" SCM_ERRMSG_NON_R5RS_ENV));
+#endif
return SCM_INTERACTION_ENV;
}
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-09-28 10:43:25 UTC (rev 1645)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-09-28 10:59:38 UTC (rev 1646)
@@ -148,6 +148,7 @@
SCM_DBG_EXCEPTION = 1 << 9,
SCM_DBG_EXPERIMENTAL = 1 << 10, /* developed but experimental features */
SCM_DBG_DEVEL = 1 << 11, /* under development */
+ SCM_DBG_COMPAT = 1 << 12, /* warns compatibility-sensitive code */
SCM_DBG_OTHER = 1 << 30 /* all other messages */
};
More information about the uim-commit
mailing list