[uim-commit] r1087 - branches/r5rs/sigscheme
kzk at freedesktop.org
kzk at freedesktop.org
Mon Aug 1 01:27:56 EST 2005
Author: kzk
Date: 2005-07-31 08:27:53 -0700 (Sun, 31 Jul 2005)
New Revision: 1087
Modified:
branches/r5rs/sigscheme/read.c
Log:
* sigscheme/read.c
- (read_list, read_sexpression): fix warning
- (read_char): call strlen properly.
Modified: branches/r5rs/sigscheme/read.c
===================================================================
--- branches/r5rs/sigscheme/read.c 2005-07-31 14:54:56 UTC (rev 1086)
+++ branches/r5rs/sigscheme/read.c 2005-07-31 15:27:53 UTC (rev 1087)
@@ -148,12 +148,13 @@
static ScmObj read_sexpression(ScmObj port)
{
+ int c = 0;
+ int c1 = 0;
+
#if DEBUG_PARSER
printf("read_sexpression\n");
#endif
- int c = 0;
- int c1 = 0;
while (1) {
c = skip_comment_and_space(port);
@@ -225,16 +226,16 @@
static ScmObj read_list(ScmObj port, int closeParen)
{
-#if DEBUG_PARSER
- printf("read_list\n");
-#endif
-
ScmObj list_head = SCM_NIL;
ScmObj list_tail = SCM_NIL;
ScmObj item = SCM_NIL;
int line = SCM_PORTINFO_LINE(port);
-
int c = 0;
+
+#if DEBUG_PARSER
+ printf("read_list\n");
+#endif
+
while (1) {
c = skip_comment_and_space(port);
@@ -286,15 +287,11 @@
}
static ScmObj read_char(ScmObj port)
-{
-#if DEBUG_PARSER
- printf("read_char\n");
-#endif
-
+{
char *ch = read_char_sequence(port);
#if DEBUG_PARSER
- printf("ch = %s\n", ch);
+ printf("read_char : ch = %s\n", ch);
#endif
/* check special sequence "space" and "newline" */
@@ -396,6 +393,8 @@
/* read char sequence */
str = read_char_sequence(port);
+ str_len = strlen(str);
+
if (strlen(str) == 1
&& (strcmp(str, "+") == 0 || strcmp(str, "-") == 0))
{
More information about the uim-commit
mailing list