Changeset 345


Ignore:
Timestamp:
Nov 12, 2009 12:25:31 AM (10 years ago)
Author:
bjarni
Message:

Define STRING_COMPARE_NOCASE in CoinSolver?.c for portability with Unix vs. Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CoinMP/src/CoinSolver.c

    r344 r345  
    129129
    130130
     131#ifdef _WIN32
     132 #define STRING_COMPARE_NOCASE(s1, s2)  strcmpi(s1, s2)
     133#else
     134 #define STRING_COMPARE_NOCASE(s1, s2)  strcasecmp(s1, s2)
     135#endif
    131136
    132137int coinLocateOptionName(PSOLVER pSolver, char* OptionName)
     
    135140
    136141        for (i = 0; i < pSolver->OptionCount; i++) {
    137                 if (strcmpi(OptionName, pSolver->OptionTable[i].OptionName) != 0) {
     142                if (STRING_COMPARE_NOCASE(OptionName, pSolver->OptionTable[i].OptionName) != 0) {
    138143                        return pSolver->OptionTable[i].OptionID;
    139144                }
    140                 if (strcmpi(OptionName, pSolver->OptionTable[i].ShortName) != 0) {
     145                if (STRING_COMPARE_NOCASE(OptionName, pSolver->OptionTable[i].ShortName) != 0) {
    141146                        return pSolver->OptionTable[i].OptionID;
    142147                }
Note: See TracChangeset for help on using the changeset viewer.