On 7/31/07, Neil Hodgson <[EMAIL PROTECTED]> wrote:
> Don't really see the advantage over using quotes where needed when
> specifying commands.
>
Fair enough, but the patch isn't very complicated:
In SciTEBase::SelectionIntoProperties() (ScTEBase.cxx, 1213)
insert this code:
// collecting parameters into a collective 'Parameters' property
SString parameters;
for (int param = 0; param < maxParam; param++) {
SString paramText(param + 1);
SString paramTextVal = props.Get(paramText.c_str());
if (paramTextVal.length() > 0) {
if (paramTextVal.contains(" ")) {
SString val;
val += "\"";
val += paramTextVal;
val += "\"";
paramTextVal = val;
}
parameters += paramTextVal;
parameters += " ";
}
}
props.Set("Parameters",parameters.c_str());
A more elegant way to quote the string using SString, anybody?
Now all I have to do to get my program to use these parameters is to
modify the command.go properties - for instance:
command.go.*.lua=lua "$(FileNameExt)" $(Parameters)
BTW, the existing line in lua.properties is problematic:
command.go.*.lua=Lua-5.0.exe "$(FileNameExt)"
because this only works for Windows; need something like:
if PLAT_GTK
command.go.*.lua=lua "$(FileNameExt)"
if PLAT_WIN
command.go.*.lua=Lua-5.0.exe "$(FileNameExt)"
Or just leave out the .exe?
The Lua people are now just calling their executable 'lua', now that
the 5.0-5.1 transistion is over.
Anyway, just to show that it can be done and it isn't complicated.
Tastes may differ, of course.
steve d.
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest