diff --git a/Cantera/src/equil/vcs_MultiPhaseEquil.cpp b/Cantera/src/equil/vcs_MultiPhaseEquil.cpp index c8348e946..9d8863917 100644 --- a/Cantera/src/equil/vcs_MultiPhaseEquil.cpp +++ b/Cantera/src/equil/vcs_MultiPhaseEquil.cpp @@ -936,7 +936,7 @@ namespace VCSnonideal { Cantera::ThermoPhase *tPhase = 0; int iSurPhase = -1; - int gasPhase; + bool gasPhase; int printLvl = vprob->m_printLvl; /* @@ -957,8 +957,8 @@ namespace VCSnonideal { * current phase. */ int eos = tPhase->eosType(); - if (eos == cIdealGas) gasPhase = 1; - else gasPhase = 0; + if (eos == cIdealGas) gasPhase = true; + else gasPhase = false; /* * Find out the number of species in the phase diff --git a/tools/src/cti2ctml.cpp b/tools/src/cti2ctml.cpp index adf7c418b..b908af1c8 100644 --- a/tools/src/cti2ctml.cpp +++ b/tools/src/cti2ctml.cpp @@ -30,7 +30,7 @@ int iDebug_HKM = 0; /*****************************************************************/ static void printUsage() { - cout << "ctitoxml [-h] infile.cti" << endl; + cout << "cti2ctml [-h] infile.cti" << endl; cout << " Translates a cti formated file to an xml file" << endl; cout << " The xml file will be named infile.xml" << endl; } @@ -76,16 +76,9 @@ int main(int argc, char** argv) { XML_Node *xc = new XML_Node(); string path = findInputFile(infile); ctml::get_CTML_Tree(xc, path, 0); - XML_Node *xd = new XML_Node(); - xc->copy(xd); - ofstream tout; - tout.open("testdest.xml"); - xc->write(tout); - tout.close(); - tout.open("testdest2.xml"); - xd->write(tout); - tout.close(); - + //XML_Node *xd = new XML_Node(); + //xc->copy(xd); + } catch (CanteraError) { showErrors(cout); diff --git a/tools/testtools/mdp_allo.cpp b/tools/testtools/mdp_allo.cpp index 41faa7666..058374aad 100644 --- a/tools/testtools/mdp_allo.cpp +++ b/tools/testtools/mdp_allo.cpp @@ -17,6 +17,10 @@ #include "mdp_allo.h" +#ifdef WIN32 +#pragma warning(disable:4996) +#endif + /* * Allocate global storage for 2 debugging ints that are used in IO of * error information. @@ -54,7 +58,7 @@ int MDP_ALLO_errorOption = 3; /****************************************************************************/ /****************************************************************************/ -static void mdp_alloc_eh(const char *rname, int bytes) +static void mdp_alloc_eh(const char *rname, size_t bytes) /************************************************************************* * diff --git a/tools/testtools/tok_input_util.cpp b/tools/testtools/tok_input_util.cpp index 0361f939a..3fff886b0 100644 --- a/tools/testtools/tok_input_util.cpp +++ b/tools/testtools/tok_input_util.cpp @@ -16,12 +16,11 @@ * $Source$ * *====================================================================*/ - -#ifndef lint -static char const rcsid[] = - "$Id$"; +#ifdef WIN32 +#pragma warning(disable:4996) #endif + #include #include #include @@ -789,7 +788,7 @@ char *scan_for_string(FILE *ifp, const char *string, const int maxVal, * handled by terminally exiting the program. */ { - int len; + size_t len; char input[MAX_INPUT_STR_LN + 1]; if (scan_for_line(ifp, string, input, KEY_CHAR, PrintInputFile) < 0) exit(-1); @@ -1305,7 +1304,7 @@ char *TokToStrng (const TOKEN *keyptr) int i; if (!keyptr) return NULL; if (!keyptr->orig_str) return NULL; - int iln = strlen(keyptr->orig_str) + 1 + keyptr->ntokes; + size_t iln = strlen(keyptr->orig_str) + 1 + keyptr->ntokes; char *fstr = (char *) malloc(iln * sizeof(char)); char *const*str = &(keyptr->tok_ptr[0]); @@ -1550,10 +1549,19 @@ void strip_item_from_token(int iword, TOKEN *tok) { if (!tok) return; if (iword < 0 || iword > tok->ntokes) return; +#ifdef WIN32 + __w64 int ioffset = tok->tok_ptr[iword] - tok->tok_str; +#else int ioffset = tok->tok_ptr[iword] - tok->tok_str; - int ilength = strlen(tok->tok_ptr[iword]); +#endif + size_t ilength = strlen(tok->tok_ptr[iword]); +#ifdef WIN32 + __w64 int i = ioffset; + __w64 int j = ioffset + ilength; +#else int i = ioffset; int j = ioffset + ilength; +#endif if (j <= (int) strlen(tok->orig_str)) { while(tok->orig_str[j] != '\0') { tok->orig_str[i] = tok->orig_str[j]; diff --git a/winconfig.h b/winconfig.h index 699533f2c..ccf2de21b 100644 --- a/winconfig.h +++ b/winconfig.h @@ -45,9 +45,9 @@ typedef int ftnlen; // Fortran hidden string length type #define FTN_TRAILING_UNDERSCORE 1 -/* #undef HAS_SUNDIALS */ +#define HAS_SUNDIALS 1 /* #undef SUNDIALS_VERSION_22 */ -/* #undef SUNDIALS_VERSION_23 */ +#define SUNDIALS_VERSION_23 1 //-------- LAPACK / BLAS ---------