From 47219d0b2b41096547a02b506d7413fe9a3d308a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 18 Aug 2016 20:44:56 -0700 Subject: 3224 --- 088file.mu | 5 ----- filesystem.mu | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/088file.mu b/088file.mu index 25263fa9..6e6a89e1 100644 --- a/088file.mu +++ b/088file.mu @@ -10,9 +10,6 @@ def start-reading fs:address:filesystem, filename:address:array:character -> con load-ingredients x:number/file <- $open-file-for-reading filename contents:address:source:character, sink:address:sink:character <- new-channel 30 - $print [sink: ], sink, 10/newline - chan:address:channel:character <- get *sink, chan:offset - $print [chan in start-reading: ], chan, 10/newline start-running transmit x, sink ] @@ -25,7 +22,5 @@ def transmit file:number, sink:address:sink:character -> file:number, sink:addre sink <- write sink, c loop } - $print [closing chan after reading file], 10/newline sink <- close sink - $print [returning from 'transmit'], 10/newline ] diff --git a/filesystem.mu b/filesystem.mu index 7aa919e6..274397be 100644 --- a/filesystem.mu +++ b/filesystem.mu @@ -1,6 +1,6 @@ def main [ local-scope - $print [file to read from: ], [/tmp/mu-fs] + $print [reading characters from /tmp/mu-fs], 10/newline # initialize filesystem fs:address:filesystem <- copy 0/real-filesystem content-source:address:source:character <- start-reading fs, [/tmp/mu-fs] @@ -8,9 +8,9 @@ def main [ { c:character, done?:boolean, content-source <- read content-source break-if done? - $print [Next: ], c, 10/newline + $print [ ], c, 10/newline loop } - $print [Done reading], 10/newline + $print [done reading], 10/newline # TODO: writing to file ] -- cgit 1.4.1-2-gfad0