From c357d5467333d5eb05ad21bd79c658830ca8d97c Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Mon, 12 Jun 2000 21:25:41 +0000 Subject: [PATCH] * ports.c (scm_ungetc): Cast value to unsigned char ptr before storing in putback_buf. (scm_unread_string): Substituted SCM_ROCHARS for SCM_ROUCHARS. --- libguile/ports.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libguile/ports.c b/libguile/ports.c index ec640ecac..3badd8349 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -969,7 +969,8 @@ scm_ungetc (int c, SCM port) { if (pt->putback_buf == NULL) { - pt->putback_buf = (char *) malloc (SCM_INITIAL_PUTBACK_BUF_SIZE); + pt->putback_buf + = (unsigned char *) malloc (SCM_INITIAL_PUTBACK_BUF_SIZE); if (pt->putback_buf == NULL) scm_memory_error ("scm_ungetc"); pt->putback_buf_size = SCM_INITIAL_PUTBACK_BUF_SIZE; @@ -1081,7 +1082,7 @@ SCM_DEFINE (scm_unread_string, "unread-string", 2, 0, 0, else SCM_VALIDATE_OPINPORT (2,port); - scm_ungets (SCM_ROUCHARS (str), SCM_LENGTH (str), port); + scm_ungets (SCM_ROCHARS (str), SCM_LENGTH (str), port); return str; }