[uim-commit] r1645 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Wed Sep 28 03:43:27 PDT 2005
Author: yamaken
Date: 2005-09-28 03:43:25 -0700 (Wed, 28 Sep 2005)
New Revision: 1645
Modified:
branches/r5rs/sigscheme/debug.c
branches/r5rs/sigscheme/operations-siod.c
branches/r5rs/sigscheme/sigscheme.c
branches/r5rs/sigscheme/sigscheme.h
Log:
* sigscheme/debug.h
- (SigScm_EnablePredefinedDebugCategories): Removed
- (SigScm_PredefinedDebugCategories): New function decl
* sigscheme/debug.c
- (SigScm_EnablePredefinedDebugCategories): Removed
- (SigScm_PredefinedDebugCategories):
* New function
* (SCM_DBG_DEVEL | SCM_DBG_OTHER) is added
* sigscheme/sigscheme.c
- (SigScm_Initialize_internal): Rewrite with
SigScm_PredefinedDebugCategories()
* sigscheme/operations-siod.c
- (SigScm_SetVerboseLevel): Rewrite with
SigScm_PredefinedDebugCategories()
Modified: branches/r5rs/sigscheme/debug.c
===================================================================
--- branches/r5rs/sigscheme/debug.c 2005-09-28 10:25:12 UTC (rev 1644)
+++ branches/r5rs/sigscheme/debug.c 2005-09-28 10:43:25 UTC (rev 1645)
@@ -142,18 +142,20 @@
va_end(va);
}
-int SigScm_EnablePredefinedDebugCategories(void)
+int SigScm_PredefinedDebugCategories(void)
{
- debug_mask = (debug_mask
+#if SCM_DEBUG
+ return (SCM_DBG_DEVEL | SCM_DBG_OTHER
#if SCM_DEBUG_PARSER
- | SCM_DBG_PARSER
+ | SCM_DBG_PARSER
#endif
#if SCM_DEBUG_GC
- | SCM_DBG_GC
+ | SCM_DBG_GC
#endif
- );
-
- return debug_mask;
+ );
+#else /* SCM_DEBUG */
+ return SCM_DBG_NONE;
+#endif /* SCM_DEBUG */
}
void SigScm_Debug(const char *msg, ...)
Modified: branches/r5rs/sigscheme/operations-siod.c
===================================================================
--- branches/r5rs/sigscheme/operations-siod.c 2005-09-28 10:25:12 UTC (rev 1644)
+++ branches/r5rs/sigscheme/operations-siod.c 2005-09-28 10:43:25 UTC (rev 1645)
@@ -193,5 +193,6 @@
SigScm_SetDebugCategories(sscm_debug_mask_tbl[level]);
if (level >= 2)
- SigScm_EnablePredefinedDebugCategories();
+ SigScm_SetDebugCategories(SigScm_DebugCategories()
+ | SigScm_PredefinedDebugCategories());
}
Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c 2005-09-28 10:25:12 UTC (rev 1644)
+++ branches/r5rs/sigscheme/sigscheme.c 2005-09-28 10:43:25 UTC (rev 1645)
@@ -93,7 +93,7 @@
static void SigScm_Initialize_internal(void)
{
SigScm_SetDebugCategories(SCM_DBG_ERRMSG | SCM_DBG_BACKTRACE
- | SCM_DBG_DEVEL | SCM_DBG_OTHER);
+ | SigScm_PredefinedDebugCategories());
/*=======================================================================
Etc Variable Initialization
@@ -440,8 +440,6 @@
scm_return_value = SCM_NULL;
SigScm_SetVerboseLevel(2);
#endif
-
- SigScm_EnablePredefinedDebugCategories();
}
void SigScm_Finalize()
Modified: branches/r5rs/sigscheme/sigscheme.h
===================================================================
--- branches/r5rs/sigscheme/sigscheme.h 2005-09-28 10:25:12 UTC (rev 1644)
+++ branches/r5rs/sigscheme/sigscheme.h 2005-09-28 10:43:25 UTC (rev 1645)
@@ -575,7 +575,7 @@
/* debug.c */
int SigScm_DebugCategories(void);
void SigScm_SetDebugCategories(int categories);
-int SigScm_EnablePredefinedDebugCategories(void);
+int SigScm_PredefinedDebugCategories(void);
void SigScm_CategorizedDebug(int category, const char *msg, ...);
void SigScm_Debug(const char *msg, ...);
void SigScm_Display(ScmObj obj);
More information about the uim-commit
mailing list