From e8343d8d9b359ad4a6d85de208c1ff10d7914a85 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Wed, 2 Jan 2008 22:39:35 +0000 Subject: [PATCH] Took strcasecmp out of code, since it's not in VC++ --- Cantera/src/thermo/DebyeHuckel.cpp | 16 +++++++++------- Cantera/src/thermo/HMWSoln_input.cpp | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/Cantera/src/thermo/DebyeHuckel.cpp b/Cantera/src/thermo/DebyeHuckel.cpp index 58e8cbd8e..28bc83353 100644 --- a/Cantera/src/thermo/DebyeHuckel.cpp +++ b/Cantera/src/thermo/DebyeHuckel.cpp @@ -25,7 +25,7 @@ #include "ThermoFactory.h" #include "WaterProps.h" #include "WaterPDSS.h" -#include +#include using namespace std; @@ -1214,17 +1214,19 @@ namespace Cantera { */ static int interp_est(std::string estString) { const char *cc = estString.c_str(); - if (!strcasecmp(cc, "solvent")) { + string lc = lowercase(estString); + const char *ccl = lc.c_str(); + if (!strcmp(ccl, "solvent")) { return cEST_solvent; - } else if (!strcasecmp(cc, "chargedspecies")) { + } else if (!strcmp(ccl, "chargedspecies")) { return cEST_chargedSpecies; - } else if (!strcasecmp(cc, "weakAcidAssociated")) { + } else if (!strcmp(ccl, "weakacidassociated")) { return cEST_weakAcidAssociated; - } else if (!strcasecmp(cc, "strongAcidAssociated")) { + } else if (!strcmp(ccl, "strongacidassociated")) { return cEST_strongAcidAssociated; - } else if (!strcasecmp(cc, "polarNeutral")) { + } else if (!strcmp(ccl, "polarneutral")) { return cEST_polarNeutral; - } else if (!strcasecmp(cc, "nonpolarNeutral")) { + } else if (!strcmp(ccl, "nonpolarneutral")) { return cEST_nonpolarNeutral; } int retn, rval; diff --git a/Cantera/src/thermo/HMWSoln_input.cpp b/Cantera/src/thermo/HMWSoln_input.cpp index 7c5c4d774..b7ca71fde 100644 --- a/Cantera/src/thermo/HMWSoln_input.cpp +++ b/Cantera/src/thermo/HMWSoln_input.cpp @@ -20,7 +20,7 @@ #include "ThermoFactory.h" #include "WaterProps.h" #include "WaterPDSS.h" -#include +#include using namespace std; @@ -35,17 +35,19 @@ namespace Cantera { */ int HMWSoln::interp_est(std::string estString) { const char *cc = estString.c_str(); - if (!strcasecmp(cc, "solvent")) { + string lcs = lowercase(estString); + const char *ccl = lcs.c_str(); + if (!strcmp(ccl, "solvent")) { return cEST_solvent; - } else if (!strcasecmp(cc, "chargedspecies")) { + } else if (!strcmp(ccl, "chargedspecies")) { return cEST_chargedSpecies; - } else if (!strcasecmp(cc, "weakAcidAssociated")) { + } else if (!strcmp(ccl, "weakacidassociated")) { return cEST_weakAcidAssociated; - } else if (!strcasecmp(cc, "strongAcidAssociated")) { + } else if (!strcmp(ccl, "strongacidassociated")) { return cEST_strongAcidAssociated; - } else if (!strcasecmp(cc, "polarNeutral")) { + } else if (!strcmp(ccl, "polarneutral")) { return cEST_polarNeutral; - } else if (!strcasecmp(cc, "nonpolarNeutral")) { + } else if (!strcmp(ccl, "nonpolarneutral")) { return cEST_nonpolarNeutral; } int retn, rval;