On Thu, Jun 13, 2002 at 02:51:36AM +0200, Marcus Brinkmann wrote: > But with a ring buffer, you always have the > boundary case that a region spans over the end of the physical buffer. > (If you want an exercise, rewrite display.c:screen_shift_left() without > using a loop, but by calculating the boundaries and using wmemmove, > wmemcpy and wmemset. It's mind boggling).
Oh, it's a good idea to rotate the ring buffer so that one region doesn't span over the end, then it becomes much simpler to deal with (only 5 cases instead 40 or so). Conjugations of transformations is a standard trick of course, it's a shame that I took so long to think of it in this context. > If you tried the last version, > you will notice that this one has more bugs: scrolling doesn't work > correctly (there is a grave clipping bug, and the scrolling notifications > are not implemented) Somewhat fixed in my version here, and it worked better. However, generating notification messages for each individual char printed was way too much for poor Mach :) esp when doing a "find /share" or so which leads to massive output (it was very funny to see the result, though ;). So I have now implemented a way to collect individual changes on the server side and send them in a single message to the client. Currently, this is done in 256 byte chunks. This introduced some new bugs, though, so I really have to start debugging soon. And the code is not at all pleasant yet. When doing some tests with find /share, etc, the current code produces a really ugly flicker. Hopefully this is due to the bugs rather than a fundamental problem. Or maybe it is related to curses. I am not willing to believe that polling mode is inherently better than change notifications :) Thanks, Marcus -- `Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED] Marcus Brinkmann GNU http://www.gnu.org [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.marcus-brinkmann.de _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd