Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

ReplaceMacros second parameter in scripts

<< < (2/2)

BlueHazzard:
After some more investigation i think this is a script error and sqplus don't give a error if the parameter count is to high. So what should i do? Correct the scripts, or provide a overloaded function with the given feature? (I think i will do the second, it is less work, but can have some side effects :P )

greetings

[Edit:]

After a second overlook i think the bool parameter is only for internal use:

--- Code: ---void MacrosManager::ReplaceMacros(wxString& buffer, ProjectBuildTarget* target, bool subrequest)
{
[...]
    while ((index = buffer.Index(toNativePath)) != wxNOT_FOUND)
    {
        int end = MatchBrace(buffer, index + toNativePath.Length() - 1);
        wxString content = buffer.Mid(index + toNativePath.Length(), end - index - toNativePath.Length());
!!!     ReplaceMacros(content, target, true);
        buffer.Replace(buffer.Mid(index, end - index + 1), UnixFilename(content), false);
    }
[...]
    if (!subrequest)
    {
        buffer.Replace(_T("%%"), _T("%"));
        buffer.Replace(_T("$$"), _T("$"));
    }
}

--- End code ---

so this functionality should not be ported to the scripts or should it?

oBFusCATed:
Post a patch to trunk please, so we can fix the script there.

Navigation

[0] Message Index

[*] Previous page

Go to full version