diff options
author | Keith Packard <keithp@keithp.com> | 2018-08-05 12:23:22 +0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2018-10-13 08:21:58 -0700 |
commit | 7c04888cf9809e0c73f0813c74e8dd972facde3a (patch) | |
tree | ebb43ee5aa61cc65ce28595c19b4dd3c19812ead /src/lambdakey-v1.0/ao_scheme_os.h | |
parent | 56629222711ba3ef7853405c9b07ad614fb29b95 (diff) |
altos: Switch to newlib-nano for libc on arm
Stop using pdclib
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lambdakey-v1.0/ao_scheme_os.h')
-rw-r--r-- | src/lambdakey-v1.0/ao_scheme_os.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/lambdakey-v1.0/ao_scheme_os.h b/src/lambdakey-v1.0/ao_scheme_os.h index 8af199c2..41357552 100644 --- a/src/lambdakey-v1.0/ao_scheme_os.h +++ b/src/lambdakey-v1.0/ao_scheme_os.h @@ -19,6 +19,7 @@ #define _AO_SCHEME_OS_H_ #include "ao.h" +#include "ao_scheme.h" #define AO_SCHEME_POOL 3792 #define AO_SCHEME_TOKEN_MAX 64 @@ -29,22 +30,13 @@ #define __BYTE_ORDER __LITTLE_ENDIAN #endif -static inline int -_ao_scheme_getc() { - static uint8_t at_eol; - int c; - - if (at_eol) { - ao_cmd_readline(); - at_eol = 0; - } - c = ao_cmd_lex(); - if (c == '\n') - at_eol = 1; - return c; -} +extern int _ao_scheme_getc(void); #define ao_scheme_getc(f) ({ (void) (f); _ao_scheme_getc(); }) +#undef putc +#define putc(c, f) ({ (void) (f); ao_putchar(c); }) +#define fputs(s, f) ({ (void) (f); ao_put_string(s); }) +#define fiprintf(f, ...) ({ (void) (f); iprintf(__VA_ARGS__); }) static inline void ao_scheme_abort(void) |