diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-12 00:06:40 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-12 00:38:36 -0700 |
commit | ea19d0dc2c11f48ca384fb087b4e44ef400bfaa2 (patch) | |
tree | ba204ece67397481a3104f4c7c1d6a0f3ad271f7 /088file.mu | |
parent | ec1cd4ae38f283970a401354a1ec17823fa0b7da (diff) | |
download | mu-ea19d0dc2c11f48ca384fb087b4e44ef400bfaa2.tar.gz |
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.
Diffstat (limited to '088file.mu')
-rw-r--r-- | 088file.mu | 8 |
1 files changed, 4 insertions, 4 deletions
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 |