Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: make curses module not need wideness

Clint Adams wrote:
> On Mon, Oct 15, 2007 at 10:11:52AM +0100, Peter Stephenson wrote:
> > I think it would probably be better to let the windows have arbitrary names
> > and store them in a linked list, as we do for ztcp and zftp.  Presumably
> > there aren't going to be that many of them.  (The names can still be
> > numbers, obviously.)
> So have a struct containing just the WINDOW pointer and some kind of
> identifier?

Something like that.

> Should there be a special assoc parameter containing pointers?

I don't think there needs to be an assoc *parameter*: there's nothing to
map at the shell code level, just a list of names.  This could be
visible in a special array as a free bonus.

Internally, from the point of view of efficiency it's probably not worth
having anything more than a linked list, but on the other hand the hash
stuff does more of the work for you, once you've got it set up (some of
the module stuff got simpler when I turned those into a hash).

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

Messages sorted by: Reverse Date, Date, Thread, Author