From: Michael D. Lowis Date: Wed, 4 Jul 2012 01:12:58 +0000 (-0400) Subject: Fixed bug in buf-fill X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=51688b8f5fb5552d6de00dda64e547bcdbb06a1a;p=archive%2Fdlang-scm.git Fixed bug in buf-fill --- diff --git a/Makefile b/Makefile index eb284bd..c5ad55a 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ TEST_OBJS = $(TEST_FILES:%.$(TEST_EXT)=%.o) # Compiler and Linker Options #---------------------------- CSC = csc -CSCFLAGS = -c -explicit-use +CSCFLAGS = -c # Build Rules #------------ diff --git a/source/buf.scm b/source/buf.scm index 2fcf7e0..cb21634 100644 --- a/source/buf.scm +++ b/source/buf.scm @@ -1,4 +1,7 @@ -(declare (unit buf)) +(declare (unit buf) + (uses library)) + +(use vector-lib) (define-record buf src @@ -49,7 +52,8 @@ (define (buf-fill b n) (if (buf? b) (let loop ((i 0)) - ((buf-ldfn b)) + (buf-data-set! + (vector-append (buf-data b) ((buf-ldfn b)))) (if (< i n) (loop (+ i 1)))))) (define (buf-lookahead b n)