diff options
author | Keith Packard <keithp@keithp.com> | 2018-01-06 18:11:19 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2018-01-06 18:11:19 -0800 |
commit | b446d9657cad0ff45f6f65c774d82cb9f2f65088 (patch) | |
tree | 07f482031d8657d2b39eb0c661c0ee40b2430748 /src/lambdakey-v1.0 | |
parent | 16061947d4376b41e596d87f97ec53ec29d17644 (diff) |
altos/lambdakey-v1.0: Switch back to command buffered input
Instead of just reading from stdin with no echo or editing.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lambdakey-v1.0')
-rw-r--r-- | src/lambdakey-v1.0/ao_lambdakey.c | 2 | ||||
-rw-r--r-- | src/lambdakey-v1.0/ao_scheme_os.h | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/lambdakey-v1.0/ao_lambdakey.c b/src/lambdakey-v1.0/ao_lambdakey.c index 2bd626f1..f1a2aa38 100644 --- a/src/lambdakey-v1.0/ao_lambdakey.c +++ b/src/lambdakey-v1.0/ao_lambdakey.c @@ -16,7 +16,7 @@ #include <ao_scheme.h> static void scheme_cmd() { - ao_scheme_read_eval_print(stdin, stdout, true); + ao_scheme_read_eval_print(stdin, stdout, false); } static const struct ao_cmds blink_cmds[] = { diff --git a/src/lambdakey-v1.0/ao_scheme_os.h b/src/lambdakey-v1.0/ao_scheme_os.h index 5641b476..6a2ab819 100644 --- a/src/lambdakey-v1.0/ao_scheme_os.h +++ b/src/lambdakey-v1.0/ao_scheme_os.h @@ -30,7 +30,7 @@ #endif static inline int -ao_scheme_getc() { +_ao_scheme_getc() { static uint8_t at_eol; int c; @@ -44,11 +44,7 @@ ao_scheme_getc() { return c; } -static inline void -ao_scheme_os_flush(void) -{ - flush(); -} +#define ao_scheme_getc(f) ({ (void) (f); _ao_scheme_getc(); }) static inline void ao_scheme_abort(void) |