From d803b68769947a419ef176d5c80446fcba5e9ee3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 23 Oct 2016 15:50:27 -0700 Subject: 3565 Cleaning up the console interfaces before we start changing the socket interfaces to look like them. Reading from sockets need to be non-blocking just like reading from the console. --- sandbox/002-typing.mu | 2 +- sandbox/004-programming-environment.mu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sandbox') diff --git a/sandbox/002-typing.mu b/sandbox/002-typing.mu index 12448e18..906422f5 100644 --- a/sandbox/002-typing.mu +++ b/sandbox/002-typing.mu @@ -20,7 +20,7 @@ def editor-event-loop screen:&:screen, console:&:console, editor:&:editor -> scr cursor-row:num <- get *editor, cursor-row:offset cursor-column:num <- get *editor, cursor-column:offset screen <- move-cursor screen, cursor-row, cursor-column - e:event, console, found?:bool, quit?:bool <- read-event console + e:event, found?:bool, quit?:bool, console <- read-event console loop-unless found? break-if quit? # only in tests trace 10, [app], [next-event] diff --git a/sandbox/004-programming-environment.mu b/sandbox/004-programming-environment.mu index 76938021..57eff09f 100644 --- a/sandbox/004-programming-environment.mu +++ b/sandbox/004-programming-environment.mu @@ -49,7 +49,7 @@ def event-loop screen:&:screen, console:&:console, env:&:environment -> screen:& { # looping over each (keyboard or touch) event as it occurs +next-event - e:event, console, found?:bool, quit?:bool <- read-event console + e:event, found?:bool, quit?:bool, console <- read-event console loop-unless found? break-if quit? # only in tests trace 10, [app], [next-event] -- cgit 1.4.1-2-gfad0