1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-31 01:10:24 +02:00

* ports.c (scm_getc): minor tweak.

This commit is contained in:
Rob Browning 2003-04-04 21:50:15 +00:00
parent d3e7e88dcb
commit aab1caadd3

View file

@ -924,10 +924,8 @@ scm_getc (SCM port)
scm_t_port *pt = SCM_PTAB_ENTRY (port); scm_t_port *pt = SCM_PTAB_ENTRY (port);
if (pt->rw_active == SCM_PORT_WRITE) if (pt->rw_active == SCM_PORT_WRITE)
{
/* may be marginally faster than calling scm_flush. */ /* may be marginally faster than calling scm_flush. */
scm_ptobs[SCM_PTOBNUM (port)].flush (port); scm_ptobs[SCM_PTOBNUM (port)].flush (port);
}
if (pt->rw_random) if (pt->rw_random)
pt->rw_active = SCM_PORT_READ; pt->rw_active = SCM_PORT_READ;
@ -940,17 +938,17 @@ scm_getc (SCM port)
c = *(pt->read_pos++); c = *(pt->read_pos++);
if (c == '\n') switch (c)
{ {
case '\n':
SCM_INCLINE (port); SCM_INCLINE (port);
} break;
else if (c == '\t') case '\t':
{
SCM_TABCOL (port); SCM_TABCOL (port);
} break;
else default:
{
SCM_INCCOL (port); SCM_INCCOL (port);
break;
} }
return c; return c;