[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new console client for ncurses

From: Marcus Brinkmann
Subject: Re: new console client for ncurses
Date: Fri, 14 Jun 2002 01:35:25 +0200
User-agent: Mutt/1.3.28i

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 :)


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]