diff options
| author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2015-12-06 10:02:28 +0300 |
|---|---|---|
| committer | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2015-12-06 10:02:28 +0300 |
| commit | ba2de476bd8ca4e32c1df46f5011979901b60164 (patch) | |
| tree | 484dbbcceeb4cb8c1e717bb0a798eb9c1c2ba73c /libguile-ssh | |
| parent | libguile-ssh/channel-type.c (init_channel_type): Use 'scm_from_long' (diff) | |
| download | guile-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.c | 9 |
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) { |
