diff options
-rw-r--r-- | libguile/ports.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/libguile/ports.c b/libguile/ports.c index 52315df09..bad95a7c6 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -924,10 +924,8 @@ scm_getc (SCM port) scm_t_port *pt = SCM_PTAB_ENTRY (port); if (pt->rw_active == SCM_PORT_WRITE) - { - /* may be marginally faster than calling scm_flush. */ - scm_ptobs[SCM_PTOBNUM (port)].flush (port); - } + /* may be marginally faster than calling scm_flush. */ + scm_ptobs[SCM_PTOBNUM (port)].flush (port); if (pt->rw_random) pt->rw_active = SCM_PORT_READ; @@ -940,19 +938,19 @@ scm_getc (SCM port) c = *(pt->read_pos++); - if (c == '\n') - { - SCM_INCLINE (port); - } - else if (c == '\t') + switch (c) { - SCM_TABCOL (port); + case '\n': + SCM_INCLINE (port); + break; + case '\t': + SCM_TABCOL (port); + break; + default: + SCM_INCCOL (port); + break; } - else - { - SCM_INCCOL (port); - } - + return c; } |