From 1133130986a78628ea297ce1f6a023baf4382d8f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 9 Dec 2017 16:56:20 -0800 Subject: altos/scheme: Let readline know if there's a list in progress This lets the interactive prompt change based on what state the lexer is in Signed-off-by: Keith Packard --- src/scheme/ao_scheme_float.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/scheme/ao_scheme_float.c') diff --git a/src/scheme/ao_scheme_float.c b/src/scheme/ao_scheme_float.c index 541f0264..99249030 100644 --- a/src/scheme/ao_scheme_float.c +++ b/src/scheme/ao_scheme_float.c @@ -39,6 +39,10 @@ const struct ao_scheme_type ao_scheme_float_type = { .name = "float", }; +#ifndef FLOAT_FORMAT +#define FLOAT_FORMAT "%g" +#endif + void ao_scheme_float_write(ao_poly p) { @@ -54,7 +58,7 @@ ao_scheme_float_write(ao_poly p) printf("+"); printf("inf.0"); } else - printf ("%g", f->value); + printf (FLOAT_FORMAT, v); } float -- cgit v1.2.3