core: Stderr_ also print numbers.

* posix.c (stderr_): Handle numbers.
This commit is contained in:
Jan Nieuwenhuizen 2017-01-04 20:22:31 +01:00
parent 40593ac218
commit c3a6d70f74
1 changed files with 2 additions and 0 deletions

View File

@ -89,6 +89,8 @@ stderr_ (SCM x)
apply_env (assq_ref_cache (cell_symbol_display, r0), cons (x, cons (MAKE_NUMBER (2), cell_nil)), r0);
else if (TYPE (x) == SPECIAL || TYPE (x) == STRING || TYPE (x) == SYMBOL)
fprintf (stderr, string_to_cstring (x));
else if (TYPE (x) == NUMBER)
fprintf (stderr, "%d", VALUE (x));
else
fprintf (stderr, "display: undefined\n");
return cell_unspecified;