diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-12-27 20:38:53 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-12-27 20:39:51 -0800 |
commit | f0c55e6b97edf8971ce4adad3ee53cbfa406b7ef (patch) | |
tree | d816e398a5bc38010f277e6677b9de83bc3f2faa /html/084console.mu.html | |
parent | e82dc626685875d56738e733f7e18203f2ac7f9d (diff) | |
download | mu-f0c55e6b97edf8971ce4adad3ee53cbfa406b7ef.tar.gz |
4165
Diffstat (limited to 'html/084console.mu.html')
-rw-r--r-- | html/084console.mu.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/html/084console.mu.html b/html/084console.mu.html index 635710f5..2364af89 100644 --- a/html/084console.mu.html +++ b/html/084console.mu.html @@ -105,16 +105,16 @@ if ('onhashchange' in window) { <span id="L44" class="LineNr"> 44 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> done?:bool <span class="Special"><-</span> greater-or-equal current-event-index, max <span id="L45" class="LineNr"> 45 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> done? <span id="L46" class="LineNr"> 46 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> dummy:&:<a href='084console.mu.html#L4'>event</a> <span class="Special"><-</span> new <span class="Constant"><a href='084console.mu.html#L4'>event</a>:type</span> -<span id="L47" class="LineNr"> 47 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> *dummy, <span class="Constant">1/found</span>, <span class="Constant">1/quit</span> +<span id="L47" class="LineNr"> 47 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> *dummy, <span class="Constant">1/found</span>, <span class="Constant">1/quit</span> <span id="L48" class="LineNr"> 48 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L49" class="LineNr"> 49 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> index *buf, current-event-index <span id="L50" class="LineNr"> 50 </span> <span class="Conceal">¦</span> current-event-index <span class="Special"><-</span> add current-event-index,<span class="Constant"> 1</span> <span id="L51" class="LineNr"> 51 </span> <span class="Conceal">¦</span> *console <span class="Special"><-</span> put *console, <span class="Constant">current-event-index:offset</span>, current-event-index -<span id="L52" class="LineNr"> 52 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> result, <span class="Constant">1/found</span>, <span class="Constant">0/quit</span> +<span id="L52" class="LineNr"> 52 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> result, <span class="Constant">1/found</span>, <span class="Constant">0/quit</span> <span id="L53" class="LineNr"> 53 </span> <span class="Delimiter">}</span> <span id="L54" class="LineNr"> 54 </span> switch <span class="Comment"># real event source is infrequent; avoid polling it too much</span> <span id="L55" class="LineNr"> 55 </span> result:<a href='084console.mu.html#L4'>event</a>, found?:bool <span class="Special"><-</span> check-for-interaction -<span id="L56" class="LineNr"> 56 </span> <span class="muControl">return</span> result, found?, <span class="Constant">0/quit</span> +<span id="L56" class="LineNr"> 56 </span> <span class="muControl"> return</span> result, found?, <span class="Constant">0/quit</span> <span id="L57" class="LineNr"> 57 </span>] <span id="L58" class="LineNr"> 58 </span> <span id="L59" class="LineNr"> 59 </span><span class="Comment"># variant of read-event for just keyboard events. Discards everything that</span> @@ -128,7 +128,7 @@ if ('onhashchange' in window) { <span id="L67" class="LineNr"> 67 </span> <span class="muControl">return-unless</span> found?,<span class="Constant"> 0</span>, found?, quit? <span id="L68" class="LineNr"> 68 </span> c:char, converted?:bool <span class="Special"><-</span> maybe-convert x, <span class="Constant">text:variant</span> <span id="L69" class="LineNr"> 69 </span> <span class="muControl">return-unless</span> converted?,<span class="Constant"> 0</span>, <span class="Constant">0/found</span>, <span class="Constant">0/quit</span> -<span id="L70" class="LineNr"> 70 </span> <span class="muControl">return</span> c, <span class="Constant">1/found</span>, <span class="Constant">0/quit</span> +<span id="L70" class="LineNr"> 70 </span> <span class="muControl"> return</span> c, <span class="Constant">1/found</span>, <span class="Constant">0/quit</span> <span id="L71" class="LineNr"> 71 </span>] <span id="L72" class="LineNr"> 72 </span> <span id="L73" class="LineNr"> 73 </span><span class="muRecipe">def</span> <a href='084console.mu.html#L73'>send-keys-to-channel</a> <a href='084console.mu.html#L23'>console</a>:&:<a href='084console.mu.html#L23'>console</a>, chan:&:<a href='075channel.mu.html#L47'>sink</a>:char, <a href='081print.mu.html#L16'>screen</a>:&:<a href='081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span><a href='084console.mu.html#L23'>console</a>:&:<a href='084console.mu.html#L23'>console</a>, chan:&:<a href='075channel.mu.html#L47'>sink</a>:char, <a href='081print.mu.html#L16'>screen</a>:&:<a href='081print.mu.html#L16'>screen</a> [ @@ -141,7 +141,7 @@ if ('onhashchange' in window) { <span id="L80" class="LineNr"> 80 </span> <span class="Conceal">¦</span> assert c, <span class="Constant">[invalid <a href='084console.mu.html#L4'>event</a>, expected text]</span> <span id="L81" class="LineNr"> 81 </span> <span class="Conceal">¦</span> <a href='081print.mu.html#L16'>screen</a> <span class="Special"><-</span> print <a href='081print.mu.html#L16'>screen</a>, c <span id="L82" class="LineNr"> 82 </span> <span class="Conceal">¦</span> chan <span class="Special"><-</span> <a href='075channel.mu.html#L67'>write</a> chan, c -<span id="L83" class="LineNr"> 83 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L83" class="LineNr"> 83 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">}</span> <span id="L85" class="LineNr"> 85 </span> chan <span class="Special"><-</span> close chan <span id="L86" class="LineNr"> 86 </span>] @@ -153,7 +153,7 @@ if ('onhashchange' in window) { <span id="L92" class="LineNr"> 92 </span> <span class="Conceal">¦</span> _, found?:bool <span class="Special"><-</span> <a href='084console.mu.html#L35'>read-event</a> <a href='084console.mu.html#L23'>console</a> <span id="L93" class="LineNr"> 93 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> found? <span id="L94" class="LineNr"> 94 </span> <span class="Conceal">¦</span> switch -<span id="L95" class="LineNr"> 95 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L95" class="LineNr"> 95 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L96" class="LineNr"> 96 </span> <span class="Delimiter">}</span> <span id="L97" class="LineNr"> 97 </span>] <span id="L98" class="LineNr"> 98 </span> |