altos/lambdakey-v1.0: Fix obvious build errors
[fw/altos] / src / lambdakey-v1.0 / ao_lambdakey.c
index f1a2aa38ed2cb9d73ce600c259838d7649239daa..c50317c01a5fbea013257bcc1b292cdd729252e2 100644 (file)
@@ -15,7 +15,7 @@
 #include <ao.h>
 #include <ao_scheme.h>
 
-static void scheme_cmd() {
+static void scheme_cmd(void) {
        ao_scheme_read_eval_print(stdin, stdout, false);
 }
 
@@ -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();