From ea19d0dc2c11f48ca384fb087b4e44ef400bfaa2 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 12 Sep 2016 00:06:40 -0700 Subject: 3337 - first use of type abbreviations: text In the process I've uncover a couple of situations we don't support type abbreviations yet. They're next. --- 088file.mu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '088file.mu') diff --git a/088file.mu b/088file.mu index 012de50a..8a34b375 100644 --- a/088file.mu +++ b/088file.mu @@ -31,11 +31,11 @@ def start-reading fs:address:filesystem, filename:address:array:character -> con break-if done? tmp:file-mapping <- index *data, i i <- add i, 1 - curr-filename:address:array:character <- get tmp, name:offset + curr-filename:text <- get tmp, name:offset found?:boolean <- equal filename, curr-filename loop-unless found? contents:address:source:character, sink:address:sink:character <- new-channel 30 - curr-contents:address:array:character <- get tmp, contents:offset + curr-contents:text <- get tmp, contents:offset start-running transmit-from-text curr-contents, sink return } @@ -111,10 +111,10 @@ def transmit-to-fake-file fs:address:filesystem, filename:address:array:characte buf <- append buf, c loop } - contents:address:array:character <- buffer-to-array buf + contents:text <- buffer-to-array buf new-file-mapping:file-mapping <- merge filename, contents # write to filesystem - curr-filename:address:array:character <- copy 0 + curr-filename:text <- copy 0 data:address:array:file-mapping <- get *fs, data:offset # replace file contents if it already exists i:number <- copy 0 -- cgit 1.4.1-2-gfad0