From b4d1abe54f2ba321e2417bbb9556e136add3852d Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 4 Sep 2014 18:43:12 +0900 Subject: [PATCH] remove unused port operaotrs --- port.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/port.c b/port.c index db1a6e96..f53832f5 100644 --- a/port.c +++ b/port.c @@ -183,40 +183,6 @@ pic_port_port_p(pic_state *pic) return pic_bool_value(pic_port_p(v)); } -static pic_value -pic_port_input_port_open_p(pic_state *pic) -{ - pic_value v; - struct pic_port *port; - - pic_get_args(pic, "o", &v); - - if (! pic_port_p(v)) - return pic_false_value(); - port = pic_port_ptr(v); - if ((port->flags & PIC_PORT_IN) == 0) - return pic_false_value(); - - return pic_bool_value(port->status == PIC_PORT_OPEN); -} - -static pic_value -pic_port_output_port_open_p(pic_state *pic) -{ - pic_value v; - struct pic_port *port; - - pic_get_args(pic, "o", &v); - - if (! pic_port_p(v)) - return pic_false_value(); - port = pic_port_ptr(v); - if ((port->flags & PIC_PORT_OUT) == 0) - return pic_false_value(); - - return pic_bool_value(port->status == PIC_PORT_OPEN); -} - static pic_value pic_port_eof_object_p(pic_state *pic) { @@ -699,11 +665,7 @@ pic_init_port(pic_state *pic) pic_defun(pic, "textual-port?", pic_port_textual_port_p); pic_defun(pic, "binary-port?", pic_port_binary_port_p); pic_defun(pic, "port?", pic_port_port_p); - pic_defun(pic, "input-port-open?", pic_port_input_port_open_p); - pic_defun(pic, "output-port-open?", pic_port_output_port_open_p); pic_defun(pic, "close-port", pic_port_close_port); - pic_defun(pic, "close-input-port", pic_port_close_port); - pic_defun(pic, "close-output-port", pic_port_close_port); /* string I/O */ pic_defun(pic, "open-input-string", pic_port_open_input_string);