1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-22 20:40:29 +02:00

(scm_getc, scm_lfwrite): Recognise \a \b and \r for port column.

This commit is contained in:
Kevin Ryde 2004-09-07 00:22:19 +00:00
parent c1122753ac
commit a727f4f629

View file

@ -1010,9 +1010,17 @@ scm_getc (SCM port)
switch (c) switch (c)
{ {
case '\a':
break;
case '\b':
SCM_DECCOL (port);
break;
case '\n': case '\n':
SCM_INCLINE (port); SCM_INCLINE (port);
break; break;
case '\r':
SCM_ZEROCOL (port);
break;
case '\t': case '\t':
SCM_TABCOL (port); SCM_TABCOL (port);
break; break;
@ -1053,9 +1061,17 @@ scm_lfwrite (const char *ptr, size_t size, SCM port)
ptob->write (port, ptr, size); ptob->write (port, ptr, size);
for (; size; ptr++, size--) { for (; size; ptr++, size--) {
if (*ptr == '\n') { if (*ptr == '\a') {
}
else if (*ptr == '\b') {
SCM_DECCOL(port);
}
else if (*ptr == '\n') {
SCM_INCLINE(port); SCM_INCLINE(port);
} }
else if (*ptr == '\r') {
SCM_ZEROCOL(port);
}
else if (*ptr == '\t') { else if (*ptr == '\t') {
SCM_TABCOL(port); SCM_TABCOL(port);
} }