remove unused port operaotrs
This commit is contained in:
parent
14e7fd4e98
commit
b4d1abe54f
38
port.c
38
port.c
|
@ -183,40 +183,6 @@ pic_port_port_p(pic_state *pic)
|
||||||
return pic_bool_value(pic_port_p(v));
|
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
|
static pic_value
|
||||||
pic_port_eof_object_p(pic_state *pic)
|
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, "textual-port?", pic_port_textual_port_p);
|
||||||
pic_defun(pic, "binary-port?", pic_port_binary_port_p);
|
pic_defun(pic, "binary-port?", pic_port_binary_port_p);
|
||||||
pic_defun(pic, "port?", pic_port_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-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 */
|
/* string I/O */
|
||||||
pic_defun(pic, "open-input-string", pic_port_open_input_string);
|
pic_defun(pic, "open-input-string", pic_port_open_input_string);
|
||||||
|
|
Loading…
Reference in New Issue