summaryrefslogtreecommitdiff
path: root/libguile-ssh
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-12-06 10:02:28 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-12-06 10:02:28 +0300
commitba2de476bd8ca4e32c1df46f5011979901b60164 (patch)
tree484dbbcceeb4cb8c1e717bb0a798eb9c1c2ba73c /libguile-ssh
parentlibguile-ssh/channel-type.c (init_channel_type): Use 'scm_from_long' (diff)
downloadguile-ssh-ba2de476bd8ca4e32c1df46f5011979901b60164.tar.gz
libguile-ssh/channel-type.c (print_channel): Improve
* libguile-ssh/channel-type.c (print_channel): Use 'scm_print_port_mode' procedure from Guile API so the mode will be printed right.
Diffstat (limited to 'libguile-ssh')
-rw-r--r--libguile-ssh/channel-type.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libguile-ssh/channel-type.c b/libguile-ssh/channel-type.c
index 323e0d6..1c63c6c 100644
--- a/libguile-ssh/channel-type.c
+++ b/libguile-ssh/channel-type.c
@@ -183,12 +183,9 @@ print_channel (SCM channel, SCM port, scm_print_state *pstate)
{
struct channel_data *ch = _scm_to_channel_data (channel);
- if (SCM_INPUT_PORT_P (port) && SCM_OUTPUT_PORT_P (port))
- scm_puts ("#<channel ", port);
- else if (SCM_INPUT_PORT_P (port))
- scm_puts ("#<input channel ", port);
- else if (SCM_OUTPUT_PORT_P (port))
- scm_puts ("#<output channel ", port);
+ scm_puts ("#<", port);
+ scm_print_port_mode (channel, port);
+ scm_puts ("channel ", port);
if (! ch)
{