Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: special/readonly variables in sh emulation
- X-seq: zsh-workers 16871
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: special/readonly variables in sh emulation
- Date: Wed, 20 Mar 2002 17:41:45 +0000
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- In-reply-to: <12215.1016632380@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20020320125519.GA18479@xxxxxxxxxx> <12215.1016632380@xxxxxxx>
- Sender: Oliver Kiddle <kiddleo@xxxxxxxxxx>
On Wed, Mar 20, 2002 at 01:53:00PM +0000, Peter Stephenson wrote:
>
> It sounds perfectly reasonable, the difficulty is probably how you make
> all the current stuff with getsparam etc. fit in with a table stored in
> the parameter.
Yes. I was going to try to leave things like getsparam initially so
that I don't break the current stuff.
> This got truncated somehow, I meant the zsh/mapfile module, where
> $mapfile actually reads in a complete file of arbitrary length, and
> `mapfile[...]=' or `vared mapfile[...]' writes a value to it. The way
> the assignment code works, you have to retrieve the value first (in the
> case of vared, even if you just finished reading and modifying the
Ah, I understand now.
I suppose the problem is that there is a lot of code which reads the
value of a param by going straight to the u union (just grep for
pm->u.str in the source to see). It would be better if all getting
and setting values went through functions in param.c. Calling
something like fetchvalue would return a pointer to a Param but not
actually retrieve the value of the parameter. This could be defered
until actually reading the value. So there will need to be functions
which do things like return association keys or assign to an array
range in the method table. We could even make the param struct an
opaque type - passing Params out as void pointers so that only code
in params.c can dig about inside it. I'm not sure it is worth the
bother though.
Would it be a good idea to allow arrays to be arrays of any type
such as integers. Ksh arrays can be arrays of floats, scalars
or integers but not arrays of arrays or namespaces.
Oliver
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author