On Wed, Sep 17, 2008 at 09:10:31PM -0400, Eric H. Johnson wrote:
> John,
>
> Thanks, that got it. Does a different parser get called for the hal file?
> Something other than bash? Because that exact syntax does work when run from
> the hal file.
Yes, basically it gets parsed twice.
The first time it gets parsed by the shell, and halcmd is executed with
an argument array like
argc = 4
argv[0] = "halcmd"
argv[1] = "loadrt"
argv[2] = "hm2_5i20"
argv[3] = "config=firmware=hm2/5i20/SVST8_4.BIT num_pwmgens=1"
^^^ quotes are gone (parsed by shell) but argument has
embedded whitespace
then *in version 2.2.x*, halcmd pastes the arguments back together these
arguments into one string, and feeds that string to the same parser
halcmd uses in interactive mode. In 2.2.x, I expect the kind of failure
you saw.
*in TRUNK*, halcmd will take these arguments argv[1..3] as the parsed
arguments instead of pasting and re-parsing. In TRUNK, I would have
expected your halcmd line to work. There are other consequences of this
change, but I think it's for the best overall. (but if you're using
trunk and seeing this behavior, there's still something wrong--I didn't
catch enough of the thread to know what version you're on)
----------------------------
revision 1.9
date: 2008/04/11 14:31:23; author: jepler; state: Exp; lines: +14 -16
make stuff like
halcmd loadusr io -ini "path with spaces"
work. this disables inivar substitution on commands given on the halcmd
commandline but that feature doesn't seem to be used.
----------------------------
Jeff
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers