klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit fbd1b69b68cc68b9b48a251d26b3e1bb28dde7ef
parent 842a15801195249d8f1cc3c3f3fbfa0d103ff13a
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 18 Nov 2011 13:48:39 -0300

Added check to close_file to only work in file ports. This function may be eliminated later thou.

Diffstat:
Msrc/kgports.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/kgports.c b/src/kgports.c @@ -165,7 +165,7 @@ void close_file(klisp_State *K, TValue *xparams, TValue ptree, TValue denv) bool writep = bvalue(xparams[1]); UNUSED(denv); - bind_1tp(K, ptree, "port", ttisport, port); + bind_1tp(K, ptree, "file port", ttisfport, port); bool dir_ok = writep? kport_is_output(port) : kport_is_input(port); @@ -536,7 +536,7 @@ TValue read_all_expr(klisp_State *K, TValue port) } } -/* interceptor for errors during reading, also for the continuat */ +/* interceptor for errors during reading */ void do_int_close_file(klisp_State *K, TValue *xparams, TValue ptree, TValue denv) {