zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: special/readonly variables in sh emulation
Date: Wed, 20 Mar 2002 17:41:45 +0000	[thread overview]
Message-ID: <20020320174145.GA22966@logica.com> (raw)
In-Reply-To: <12215.1016632380@csr.com>

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.


  reply	other threads:[~2002-03-20 17:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-18 12:56 Oliver Kiddle
2002-03-18 14:07 ` Peter Stephenson
2002-03-18 15:41   ` Oliver Kiddle
2002-03-19  1:43     ` Bart Schaefer
2002-03-20 12:55       ` Oliver Kiddle
2002-03-20 13:53         ` Peter Stephenson
2002-03-20 17:41           ` Oliver Kiddle [this message]
2002-03-26 11:09           ` Oliver Kiddle
2002-03-26 16:55             ` Bart Schaefer
2002-03-19 11:27     ` Peter Stephenson
2002-04-03 14:57 Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020320174145.GA22966@logica.com \
    --to=okiddle@yahoo.co.uk \
    --cc=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).