diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-12-14 13:21:32 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-12-14 13:21:59 -0800 |
commit | d4b4d018c76409a96b82bee1e81c735648e57918 (patch) | |
tree | 952ce8bce8b74a9a93514e4d210d3fb9f1a3c8a4 /edit.mu | |
parent | 6c8f19d2be6eb4cd227c2ba6f3e189b8f3a72608 (diff) | |
download | mu-d4b4d018c76409a96b82bee1e81c735648e57918.tar.gz |
428 - cleanup odds and ends
Diffstat (limited to 'edit.mu')
-rw-r--r-- | edit.mu | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/edit.mu b/edit.mu index d4937c60..706d5de4 100644 --- a/edit.mu +++ b/edit.mu @@ -1,18 +1,18 @@ ; a screen is an array of pointers to lines, in turn arrays of characters (function new-screen [ - ((default-scope scope-address) <- new (scope literal) (30 literal)) - ((nrows integer) <- next-input) - ((ncols integer) <- next-input) - ((result screen-address) <- new (screen literal) (nrows integer)) - ((rowidx integer) <- copy (0 literal)) + (default-scope:scope-address <- new scope:literal 30:literal) + (nrows:integer <- next-input) + (ncols:integer <- next-input) + (result:screen-address <- new screen:literal nrows:integer) + (rowidx:integer <- copy 0:literal) { begin - ((curr-line-address-address line-address-address) <- index-address (result screen-address deref) (rowidx integer)) - ((curr-line-address-address line-address-address deref) <- new (line literal) (ncols integer)) - ((curr-line-address line-address) <- copy (curr-line-address-address line-address-address deref)) - ((rowidx integer) <- add (rowidx integer) (1 literal)) - ((x boolean) <- not-equal (rowidx integer) (nrows integer)) - (loop-if (x boolean)) + (curr-line-address-address:line-address-address <- index-address result:screen-address/deref rowidx:integer) + (curr-line-address-address:line-address-address/deref <- new line:literal ncols:integer) + (curr-line-address:line-address <- copy curr-line-address-address:line-address-address/deref) + (rowidx:integer <- add rowidx:integer 1:literal) + (x:boolean <- not-equal rowidx:integer nrows:integer) + (loop-if x:boolean) } - (reply (result screen-address)) + (reply result:screen-address) ]) |