Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #29025

Re: RfD: Interpret S\" (Version 2)

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail
From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: RfD: Interpret S\" (Version 2)
Date Wed, 12 Mar 2014 13:02:27 +0100
Organization 1&1 Internet AG
Lines 56
Message-ID <lfpicj$75g$1@online.de> (permalink)
References <op.xcj1pdntsu5d0p@david> <lfnl3l$7su$1@dont-email.me> <lfnrth$eu0$1@online.de> <lfo39m$uo8$1@dont-email.me>
NNTP-Posting-Host p5dcd6afa.dip0.t-ipconnect.de
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Trace online.de 1394625747 7344 93.205.106.250 (12 Mar 2014 12:02:27 GMT)
X-Complaints-To abuse@einsundeins.com
NNTP-Posting-Date Wed, 12 Mar 2014 12:02:27 +0000 (UTC)
User-Agent KNode/4.11.5
Xref csiph.com comp.lang.forth:29025

Show key headers only | View raw


Alex McDonald wrote:

> on 11/03/2014 20:32:47, Bernd Paysan wrote:
>> Sure, but sometimes though shalt count to three, neither to two nor to
>> four, because three is the right number. Or so. The reason for having
>> two buffers is that RENAME-FILE needs two strings, one is clearly
>> insufficient, and many are too many. We have other places were we
>> don't follow this rule, either.
> 
> Was it addressed elsewhere? I didn't see it.

We have 16 locals, which also is in the "zero, one, many" range.  We have 
minimum stack depths.  We have the 84 characters for PAD.  There are a lot 
of arbitary minimums in the standard.

>> Actually not. The rule is "store the resulting string in the buffer".
>> This defines it that you need to fit in the 80 translated characters,
>> regardless how many untranslated there were (\x20 needs four
>> untranslated characters per translated character).
> 
> Does the spec say that?

Yes:

"Parse ccc delimited by " (double quote) according to the
translation rules given in 6.2.2266 S\".  Store the resulting
string in a temporary string buffer (c-addr u)."

And the spec of the temporary string buffer is

"These buffers shall be no less than 80 characters in length,
and there shall be at least two buffers."

It is clear that you first do the parsing according to the rules, and then 
the storing into the string buffer.

>>>> a string is placed into the next available buffer.  When there
>>>> are no buffers available, the oldest buffer is overwritten.
>>>
>>> This isn't the classic definition, which is an index into some space,
>>> incremented modulo the buffer size.
>> 
>> Yes, because the "classic definition" doesn't make much sense here.
> 
> Then don't use it.

I actually don't see the "classic definition".  We talk about several 
buffers in a circular arrangement, not a circular buffer.  Apparently you 
are mislead by the word "circular".  Circular here means only that the 
oldest data is overwritten when there's no new space to allocate from.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

RfD: Interpret S\" (Version 2) "Peter Knaggs" <pjk@bcs.org.uk> - 2014-03-11 11:18 +0000
  Re: RfD: Interpret S\" (Version 2) "Alex McDonald" <blog@rivadpm.com> - 2014-03-11 18:36 +0000
    Re: RfD: Interpret S\" (Version 2) Bernd Paysan <bernd.paysan@gmx.de> - 2014-03-11 21:32 +0100
      Re: RfD: Interpret S\" (Version 2) "Alex McDonald" <blog@rivadpm.com> - 2014-03-11 22:38 +0000
        Re: RfD: Interpret S\" (Version 2) Bernd Paysan <bernd.paysan@gmx.de> - 2014-03-12 13:02 +0100
      Re: RfD: Interpret S\" (Version 2) Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-03-12 04:41 -0500
        Re: RfD: Interpret S\" (Version 2) Bernd Paysan <bernd.paysan@gmx.de> - 2014-03-12 13:16 +0100
    Re: RfD: Interpret S\" (Version 2) Mark Wills <markwills1970@gmail.com> - 2014-03-12 04:33 -0700
      Re: RfD: Interpret S\" (Version 2) Bernd Paysan <bernd.paysan@gmx.de> - 2014-03-12 12:51 +0100
        Re: RfD: Interpret S\" (Version 2) Mark Wills <markwills1970@gmail.com> - 2014-03-12 06:25 -0700
          Re: RfD: Interpret S\" (Version 2) Coos Haak <chforth@hccnet.nl> - 2014-03-12 15:59 +0100
            Re: RfD: Interpret S\" (Version 2) Bernd Paysan <bernd.paysan@gmx.de> - 2014-03-12 19:43 +0100
          Re: RfD: Interpret S\" (Version 2) "Peter Knaggs" <pjk@bcs.org.uk> - 2014-03-13 18:55 +0000

csiph-web