diff -r c7c26511138f -r 360bd6b35136 e32tools/elf2e32/source/parametermanager.cpp --- a/e32tools/elf2e32/source/parametermanager.cpp Wed Jun 16 16:51:40 2010 +0300 +++ b/e32tools/elf2e32/source/parametermanager.cpp Wed Jun 23 16:56:47 2010 +0800 @@ -25,6 +25,7 @@ #include "parametermanager.h" #include "errorhandler.h" #include +#include #include "h_utl.h" #include "h_ver.h" @@ -375,7 +376,7 @@ { "fpu", (void *)ParameterManager::ParseFPU, - "FPU type [softvfp|vfpv2]", + "FPU type [softvfp|vfpv2|vfpv3|vfpv3D16]", }, { "codepaging", @@ -2241,21 +2242,33 @@ int q = 0; unsigned int ordinalnum = 0; char *symbol = 0; - - int nq = aSysDefValues.find_first_of(",", q,sizeof(*p)); + int nq = aSysDefValues.find_first_not_of(" "); + if (nq && (nq != string::npos)) + { + sysdeflength -= nq; + aSysDefValues.erase(0, nq); + } + + nq = aSysDefValues.find_first_of(",", q,sizeof(*p)); if (nq && (nq != string::npos)) { int len = nq; + while (*(p+len-1) == ' ' || *(p+len-1) == ' ') + len --; symbol = new char[len+1]; memcpy(symbol, p, len); symbol[len] = 0; q = nq+1; + while (*(p+q) == ' ' || *(p+q) == ' ') + q ++; char val = *(p+q); if (!val || !isdigit(val)) throw ParameterParserError(SYSDEFERROR, "--sysdef"); ordinalnum = *(p+q) - '0'; aPM->SetSysDefs(ordinalnum, symbol, sysdefcount); + while (*(p+q+1) == ' ' || *(p+q+1) == ' ') + q ++; unsigned int separator = aSysDefValues.find(";", 0); @@ -2565,8 +2578,12 @@ if (strnicmp(aValue, "softvfp", 7)==0) aPM->SetFPU(0); - else if (strnicmp(aValue, "vfpv2", 5)==0) + else if ((strnicmp(aValue, "vfpv2", 5)==0) || (strnicmp(aValue, "softvfp+vfpv2",13 )==0)) aPM->SetFPU(1); + else if (strnicmp(aValue,"vfpv3", 5)==0) + aPM->SetFPU(2); + else if (strnicmp(aValue,"vfpv3D16", 8)==0) + aPM->SetFPU(3); else throw InvalidArgumentError(INVALIDARGUMENTERROR, aValue, aOption); }