about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-28 02:13:20 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-28 02:13:20 -0800
commit00662ce27a133e086e06d821608c7d53f2a7eab8 (patch)
treece284cb6a98fde3eca832f099e976a9df80929c2
parentf37597d1f0a25f863ca28c5c10817c2a3a83e1bf (diff)
downloadmu-00662ce27a133e086e06d821608c7d53f2a7eab8.tar.gz
659
'grow-buffer' was never working until now. Too much spiking lately.
-rw-r--r--color-repl.mu2
-rw-r--r--mu.arc5
2 files changed, 7 insertions, 0 deletions
diff --git a/color-repl.mu b/color-repl.mu
index 73b6935d..f086ddf5 100644
--- a/color-repl.mu
+++ b/color-repl.mu
@@ -56,7 +56,9 @@
       }
       (jump next-key:offset)
     }
+;?     (print-primitive-to-host (("append\n" literal))) ;? 1
     (result:buffer-address <- append result:buffer-address c:character)
+;?     (print-primitive-to-host (("done\n" literal))) ;? 1
     ; record backslash and one additional character
     ; test: (prn #\()
     { begin
diff --git a/mu.arc b/mu.arc
index 6ff2c6af..cc6d67c6 100644
--- a/mu.arc
+++ b/mu.arc
@@ -2338,6 +2338,7 @@
     (src:byte <- index olddata:string-address/deref i:integer)
     (dest:byte-address <- index-address x:string-address-address/deref/deref i:integer)
     (dest:byte-address <- copy src:byte)
+    (i:integer <- add i:integer 1:literal)
     (loop)
   }
   (reply in:buffer-address)
@@ -2357,11 +2358,15 @@
   (default-space:space-address <- new space:literal 30:literal)
   (in:buffer-address <- next-input)
   (c:character <- next-input)
+;?   (print-primitive-to-host c:character) ;? 1
   { begin
     ; grow buffer if necessary
     (full?:boolean <- buffer-full? in:buffer-address)
+;?     (print-primitive-to-host (("aa\n" literal))) ;? 1
     (break-unless full?:boolean)
+;?     (print-primitive-to-host (("bb\n" literal))) ;? 1
     (in:buffer-address <- grow-buffer in:buffer-address)
+;?     (print-primitive-to-host (("cc\n" literal))) ;? 1
   }
   (len:integer-address <- get-address in:buffer-address/deref length:offset)
   (s:string-address <- get in:buffer-address/deref data:offset)