summaryrefslogtreecommitdiff
path: root/src/scheme/ao_scheme_float.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-12-19 11:33:36 -0800
committerKeith Packard <keithp@keithp.com>2017-12-19 11:33:36 -0800
commit431165e5fa72ba6dffd477de32960745cdec332c (patch)
treee27c174d5d6cea72caf92de3a4fe2c97e9249ddf /src/scheme/ao_scheme_float.c
parent5628b983497d9d03e10cccee157419210a49cfa9 (diff)
altos/scheme: Rework display/write code
Unify output functions and add bool to switch between write and display mode. Make that only affect strings (as per r⁷rs). Use print recursion detection in frame and stack code, eliminating PRINT flags in type field. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/scheme/ao_scheme_float.c')
-rw-r--r--src/scheme/ao_scheme_float.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scheme/ao_scheme_float.c b/src/scheme/ao_scheme_float.c
index b75289d7..d8501548 100644
--- a/src/scheme/ao_scheme_float.c
+++ b/src/scheme/ao_scheme_float.c
@@ -46,11 +46,12 @@ const struct ao_scheme_type ao_scheme_float_type = {
#endif
void
-ao_scheme_float_write(ao_poly p)
+ao_scheme_float_write(ao_poly p, bool write)
{
struct ao_scheme_float *f = ao_scheme_poly_float(p);
float v = f->value;
+ (void) write;
if (isnanf(v))
printf("+nan.0");
else if (isinff(v)) {