[uim-commit] r1624 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Sep 27 14:43:37 PDT 2005
Author: yamaken
Date: 2005-09-27 14:43:34 -0700 (Tue, 27 Sep 2005)
New Revision: 1624
Modified:
branches/r5rs/sigscheme/datas.c
branches/r5rs/sigscheme/io.c
branches/r5rs/sigscheme/read.c
Log:
* sigscheme/io.c
- (SigScm_load_internal): Add categorized debug message
* sigscheme/read.c
- (read_sexpression, read_list, read_char, read_string, read_symbol,
read_number_or_symbol, read_word, read_char_sequence): Replace
SigScm_Debug() with SigScm_CategorizedDebug()
* sigscheme/datas.c
- (allocate_heap, add_heap, gc_mark_and_sweep, gc_mark_locations,
gc_mark, gc_sweep): Ditto
Modified: branches/r5rs/sigscheme/datas.c
===================================================================
--- branches/r5rs/sigscheme/datas.c 2005-09-27 21:27:08 UTC (rev 1623)
+++ branches/r5rs/sigscheme/datas.c 2005-09-27 21:43:34 UTC (rev 1624)
@@ -227,7 +227,7 @@
ScmObj heap, cell;
#if DEBUG_GC
- SigScm_Debug("allocate_heap num:%d size:%d", num_heap, HEAP_SIZE);
+ SigScm_CategorizedDebug(SCM_DBG_GC, "allocate_heap num:%d size:%d", num_heap, HEAP_SIZE);
#endif
/* allocate heap */
@@ -259,7 +259,7 @@
ScmObj heap, cell;
#if DEBUG_GC
- SigScm_Debug("add_heap current num of heaps:%d", *orig_num_heap);
+ SigScm_CategorizedDebug(SCM_DBG_GC, "add_heap current num of heaps:%d", *orig_num_heap);
#endif
/* increment num_heap */
@@ -322,7 +322,7 @@
static void gc_mark_and_sweep(void)
{
#if DEBUG_GC
- SigScm_Debug("[ gc start ]");
+ SigScm_CategorizedDebug(SCM_DBG_GC, "[ gc start ]");
#endif
gc_preprocess();
@@ -332,7 +332,7 @@
/* we cannot sweep the object, so let's add new heap */
if (NULLP(scm_freelist)) {
#if DEBUG_GC
- SigScm_Debug("Cannot sweeped the object, allocating new heap.");
+ SigScm_CategorizedDebug(SCM_DBG_GC, "Cannot sweep the object, allocating new heap.");
#endif
add_heap(&scm_heaps, &scm_heap_num, SCM_HEAP_SIZE, &scm_freelist);
}
@@ -471,7 +471,7 @@
size = end - start;
#if DEBUG_GC
- SigScm_Debug("gc_mark_locations() : size = %d", size);
+ SigScm_CategorizedDebug(SCM_DBG_GC, "gc_mark_locations() : size = %d", size);
#endif
gc_mark_locations_n(start, size);
@@ -491,7 +491,7 @@
void *save_regs_buf_end = (char *)save_regs_buf + sizeof(save_regs_buf);
#if DEBUG_GC
- SigScm_Debug("gc_mark()");
+ SigScm_CategorizedDebug(SCM_DBG_GC, "gc_mark()");
#endif
setjmp(save_regs_buf);
@@ -589,7 +589,7 @@
}
#if DEBUG_GC
- SigScm_Debug("scm[%d] sweeped = %d", i, corrected_obj_num);
+ SigScm_CategorizedDebug(SCM_DBG_GC, "heap[%d] swept = %d", i, corrected_obj_num);
#endif
}
scm_freelist = scm_new_freelist;
Modified: branches/r5rs/sigscheme/io.c
===================================================================
--- branches/r5rs/sigscheme/io.c 2005-09-27 21:27:08 UTC (rev 1623)
+++ branches/r5rs/sigscheme/io.c 2005-09-27 21:43:34 UTC (rev 1624)
@@ -436,6 +436,8 @@
ScmObj filepath = SCM_FALSE;
char *c_filepath = create_valid_path(c_filename);
+ SigScm_CategorizedDebug(SCM_DBG_FILE, "loading %s", c_filename);
+
/* sanity check */
if (!c_filepath)
SigScm_Error("SigScm_load_internal : file \"%s\" not found\n",
@@ -451,6 +453,8 @@
ScmOp_close_input_port(port);
+ SigScm_CategorizedDebug(SCM_DBG_FILE, "done.");
+
return SCM_TRUE;
}
Modified: branches/r5rs/sigscheme/read.c
===================================================================
--- branches/r5rs/sigscheme/read.c 2005-09-27 21:27:08 UTC (rev 1623)
+++ branches/r5rs/sigscheme/read.c 2005-09-27 21:43:34 UTC (rev 1624)
@@ -165,14 +165,14 @@
int c1 = 0;
#if DEBUG_PARSER
- SigScm_Debug("read_sexpression");
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_sexpression");
#endif
while (1) {
c = skip_comment_and_space(port);
#if DEBUG_PARSER
- SigScm_Debug("read_sexpression c = %c", c);
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_sexpression c = %c", c);
#endif
switch (c) {
@@ -245,14 +245,14 @@
char *token = NULL;
#if DEBUG_PARSER
- SigScm_Debug("read_list");
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_list");
#endif
while (1) {
c = skip_comment_and_space(port);
#if DEBUG_PARSER
- SigScm_Debug("read_list c = [%c]", c);
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_list c = [%c]", c);
#endif
if (c == EOF) {
@@ -267,7 +267,7 @@
SCM_PORT_GETC(port, c2);
#if DEBUG_PARSER
- SigScm_Debug("read_list process_dot c2 = [%c]", c2);
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_list process_dot c2 = [%c]", c2);
#endif
if (isspace(c2) || c2 == '(' || c2 == '"' || c2 == ';') {
cdr = read_sexpression(port);
@@ -317,7 +317,7 @@
char *ch = read_char_sequence(port);
#if DEBUG_PARSER
- SigScm_Debug("read_char : ch = %s", ch);
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_char : ch = %s", ch);
#endif
/* check special sequence "space" and "newline" */
@@ -346,14 +346,14 @@
int c = 0;
#if DEBUG_PARSER
- SigScm_Debug("read_string");
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_string");
#endif
while (1) {
SCM_PORT_GETC(port, c);
#if DEBUG_PARSER
- SigScm_Debug("read_string c = %c", c);
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_string c = %c", c);
#endif
switch (c) {
@@ -403,7 +403,7 @@
free(sym_name);
#if DEBUG_PARSER
- SigScm_Debug("read_symbol");
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_symbol");
#endif
return sym;
@@ -418,7 +418,7 @@
ScmObj ret = SCM_NULL;
#if DEBUG_PARSER
- SigScm_Debug("read_number_or_symbol");
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "read_number_or_symbol");
#endif
/* read char sequence */
@@ -449,7 +449,7 @@
SCM_PORT_GETC(port, c);
#if DEBUG_PARSER
- SigScm_Debug("c = %c", c);
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "c = %c", c);
#endif
switch (c) {
@@ -479,7 +479,7 @@
SCM_PORT_GETC(port, c);
#if DEBUG_PARSER
- SigScm_Debug("c = %c", c);
+ SigScm_CategorizedDebug(SCM_DBG_PARSER, "c = %c", c);
#endif
switch (c) {
More information about the uim-commit
mailing list