core: Support redirection of stderr.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 11 Nov 2018 09:04:03 +0000 (10:04 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 11 Nov 2018 09:04:03 +0000 (10:04 +0100)
commit7d2e0f1215edc5876210c9da320e37abb9f43963
treec9d65477086d3aa52d8ab891bd4112392d1945f6
parent331a0c29e6d69d6cfd4617aa283a789c09392155
core: Support redirection of stderr.

* include/libmes-mini.h (g_stderr): New global.
* lib/mes/eputc.c (eputc): Use it.
* lib/mes/eputs.c (eputs): Likewise.
* lib/mes/oputc.c (oputc): Likewise.
* lib/mes/oputs.c (oputs): Likewise.
* src/lib.c (display_error_, write_error_): Likewise.
* src/posix.c (write_byte): Likewise.
* src/mes.c (mes_builtins): Likewise.
(main): Iniitalize g_stderr.
* src/posix.c (current_error_port, set_current_error_port): New
function.
* mes/module/mes/boot-0.scm.in (current-output-port,
current-error-port): Remove.
include/libmes-mini.h
include/stdio.h
lib/mes/eputc.c
lib/mes/eputs.c
lib/mes/oputc.c
lib/mes/oputs.c
mes/module/mes/boot-0.scm.in
src/lib.c
src/mes.c
src/posix.c