X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Flambdakey-v1.0%2Fao_lambdakey.c;h=c50317c01a5fbea013257bcc1b292cdd729252e2;hp=2bd626f14c7718080e2e8c4004646bd861d0a632;hb=0e8970c7f4eb7e8dd4ef325e4db4fe7412d0ed78;hpb=16061947d4376b41e596d87f97ec53ec29d17644 diff --git a/src/lambdakey-v1.0/ao_lambdakey.c b/src/lambdakey-v1.0/ao_lambdakey.c index 2bd626f1..c50317c0 100644 --- a/src/lambdakey-v1.0/ao_lambdakey.c +++ b/src/lambdakey-v1.0/ao_lambdakey.c @@ -15,8 +15,8 @@ #include #include -static void scheme_cmd() { - ao_scheme_read_eval_print(stdin, stdout, true); +static void scheme_cmd(void) { + ao_scheme_read_eval_print(stdin, stdout, false); } static const struct ao_cmds blink_cmds[] = { @@ -24,11 +24,26 @@ static const struct ao_cmds blink_cmds[] = { { 0, 0 } }; +int +_ao_scheme_getc(void) +{ + static uint8_t at_eol; + int c; + + if (at_eol) { + ao_cmd_readline(ao_scheme_read_list ? "Λ " : "λ "); + at_eol = 0; + } + c = (unsigned char) ao_cmd_lex(); + if (c == '\n') + at_eol = 1; + return c; +} void main(void) { #ifdef LEDS_AVAILABLE - ao_led_init(LEDS_AVAILABLE); + ao_led_init(); #endif ao_clock_init(); ao_timer_init();