From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <7871fcf50612201654u2bf12d6j7a8291991e4ef991@mail.gmail.com> Date: Wed, 20 Dec 2006 19:54:58 -0500 From: "Joel Salomon" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [9fans] Implementing cooked mode Topicbox-Message-UUID: f6d1d5fa-ead1-11e9-9d60-3106f5b1d025 If a program has the console in raw mode, can it erase characters or words that it has echoed to the screen? Context is a homework assignment to implement cooked mode in user space. The code in /sys/src/cmd/rio/wind.c looks to be a start, but I don't see how to remove characters from the screen. I suppose I could use string() in libdraw and draw the string graphically rather than echoing. Rio's wind.c and acme's text.c both handle the various control characters, but they aren't pretending to write to the console. Nemo's book has a similar assignment, so it seems to be doable; I just haven't found how in the manual. Failing that, are there printable glyphs shown if control characters are write()n to the console? --Joel