public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-boot env variables parsing
Date: Thu, 08 Apr 2010 18:06:40 +0200	[thread overview]
Message-ID: <m2aateorn3.fsf@ohwell.denx.de> (raw)
In-Reply-To: <OF5350A7FE.E73D1F93-ONC12576FF.00558624-C12576FF.00563944@transmode.se> (Joakim Tjernlund's message of "Thu, 8 Apr 2010 17:41:47 +0200")

Hi Jocke,

[...]

> Since an escape char appear to exist, one should be able to use it much like you
> did above so I don't think that any use case disappears. Instead the common usage
> becomes simpler and the so far artificial use case needs an extra escape char.

Hm.  I have to admit that I did not actually try your code, but there is
a loop in there until no further substitution takes place.  It seems to
me that this loop over process_macros thus does substitution _and_ uses
up the escape characters.  

So I fear that if in one iteration _some_ substitution takes place and
the escape character is stripped in the same iteration _another_ round
of substitution will be done and the escape character is gone.  So in
effect you will have to study the whole string in advance (plus all the
substitutions it will see) to tell how many rounds the loop will take
and how many escape characters will be needed.

Such a behaviour would be very odd in my eyes.  On the other hand, this
is only theory....

Cheers
  Detlev

-- 
Directories are added, deleted, and rearranged much as you would
expect, even if you don't know it's what you'd expect.
                                         -- Tom Lord in TLA Documentation
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

  reply	other threads:[~2010-04-08 16:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01  5:27 [U-Boot] U-boot env variables parsing Nitin Mahajan
2010-04-01 12:15 ` Detlev Zundel
2010-04-01 12:31   ` Joakim Tjernlund
2010-04-01 12:47     ` Wolfgang Denk
2010-04-01 12:56       ` Joakim Tjernlund
2010-04-01 13:05         ` Wolfgang Denk
2010-04-01 13:11           ` Joakim Tjernlund
2010-04-01 14:56             ` Detlev Zundel
2010-04-01 17:13               ` Joakim Tjernlund
2010-04-01 18:27                 ` Wolfgang Denk
2010-04-01 20:08                   ` Joakim Tjernlund
2010-04-08 10:00                     ` Detlev Zundel
2010-04-08 15:41                       ` Joakim Tjernlund
2010-04-08 16:06                         ` Detlev Zundel [this message]
2010-04-08 17:49                           ` Joakim Tjernlund

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=m2aateorn3.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=u-boot@lists.denx.de \
    /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