Case insensitive plug-in function names

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1988 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-12-21 09:14:28 +00:00
parent f8b521e30e
commit 69ef5ba1ab
3 changed files with 43 additions and 17 deletions

View file

@ -136,13 +136,17 @@ void Plugins::GetExports(char* pathToDll,bool displayInfo)
bool Plugins::IsPluginCommand(char* token)
{
return GetPluginDll(0, token, 0) ? true : false;
return GetPluginDll(0, &token, 0) ? true : false;
}
char* Plugins::GetPluginDll(int uninst, char* command, int* dataHandle)
char* Plugins::GetPluginDll(int uninst, char** command, int* dataHandle)
{
char* ret = m_commands.find(command, dataHandle);
if (dataHandle && ret) {
int idx = 0;
char* ret = m_commands.find(*command, &idx);
if (ret && dataHandle) {
int v = m_commands.defines.idx2pos(idx);
if (v < 0) return 0;
strcpy(*command, m_commands.defines.get() + v);
if (uninst) *dataHandle = ((int*)m_uninstDataHandles.get())[*dataHandle];
else *dataHandle = ((int*)m_dataHandles.get())[*dataHandle];
}