unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* port-column and carriage return
@ 2004-08-27  1:29 Kevin Ryde
  2004-09-07  0:22 ` Kevin Ryde
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ryde @ 2004-08-27  1:29 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

        * ports.c (scm_getc, scm_lfwrite): Reset port-column for \r.

This will be good for printing an updating status on a tty, where you
use #\cr to go back and rewrite the line.

Bell and backspace might be good too.


[-- Attachment #2: ports.c.cr.diff --]
[-- Type: text/plain, Size: 520 bytes --]

--- ports.c.~1.193.~	2004-08-20 11:00:31.000000000 +1000
+++ ports.c	2004-08-23 15:18:44.000000000 +1000
@@ -1013,6 +1013,9 @@
       case '\n':
         SCM_INCLINE (port);
         break;
+      case '\r':
+        SCM_ZEROCOL (port);
+        break;
       case '\t':
         SCM_TABCOL (port);
         break;
@@ -1056,6 +1059,9 @@
     if (*ptr == '\n') {
       SCM_INCLINE(port);
     }
+    else if (*ptr == '\r') {
+      SCM_ZEROCOL(port);
+    }
     else if (*ptr == '\t') {
       SCM_TABCOL(port);
     }

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-07 19:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-27  1:29 port-column and carriage return Kevin Ryde
2004-09-07  0:22 ` Kevin Ryde
2004-09-07 19:51   ` Rob Browning

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).