rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Byron Rakitzis <byron@rakitzis.com>
To: bengt@softwell.se, rc@hawkwind.utcs.toronto.edu, tjg@star.le.ac.uk
Subject: Re: ifs substitution, how should it work?
Date: Thu, 18 May 2000 02:32:57 -0400	[thread overview]
Message-ID: <200005180632.XAA22341@rakitzis.com> (raw)

> From: Bengt Kleberg <bengt@softwell.se>
> Subject: Re: ifs substitution, how should it work?
>
> Re: ifs substitution, how should it work?
>
> > What would you expect
>
> >     ; ifs=(' ' '<tab>' '
> '
>
> > to do (where `<tab>' represents a literal tab)?
>
>
> I had but seen code with lists as ifs arguments, and therefore thought
> that rc was using lists.
> Ie, I would have written it as:
>
> ; ifs=(' ' '<tab>' '
> ')
>
> Would it create much trouble to change rc :-)

I am not sure what the problem is...

At the moment rc scans ifs as a list and as a sequence of characters.
i.e., the implementation is as follows:

[from glom.c:bqinput]

        memzero(isifs, sizeof isifs);
        for (isifs['\0'] = TRUE; ifs != NULL; ifs = ifs->n)
                for (s = ifs->w; *s != '\0'; s++)
                        isifs[*(unsigned char *)s] = TRUE;

So,

	ifs='abc'

and

	ifs=(a b c)

should accomplish the same thing.

Isn't that what you want?

Byron.


             reply	other threads:[~2000-05-19 22:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-18  6:32 Byron Rakitzis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-05-22  7:55 Bengt Kleberg
2000-05-22  8:53 ` Tim Goodwin
2000-05-19 22:10 Russ Cox
2000-05-18 12:57 Bengt Kleberg
2000-05-18  8:12 Bengt Kleberg
2000-05-18 12:12 ` Tim Goodwin
2000-05-16 11:22 Bengt Kleberg
2000-05-12 10:14 Bengt Kleberg
2000-05-15  9:27 ` Tim Goodwin

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=200005180632.XAA22341@rakitzis.com \
    --to=byron@rakitzis.com \
    --cc=bengt@softwell.se \
    --cc=rc@hawkwind.utcs.toronto.edu \
    --cc=tjg@star.le.ac.uk \
    /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.
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).