From 16e84c9a5b279e05589aa413642f31436c390cbf Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Mon, 13 Jul 2009 16:47:40 +0000 Subject: [PATCH] Took out some debugging stuff that was still in the main distribution --- Cantera/src/base/ct2ctml.cpp | 31 ++++++++++++------------------- Cantera/src/base/misc.cpp | 4 ++-- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/Cantera/src/base/ct2ctml.cpp b/Cantera/src/base/ct2ctml.cpp index 74ddbcdbe..591d599fb 100644 --- a/Cantera/src/base/ct2ctml.cpp +++ b/Cantera/src/base/ct2ctml.cpp @@ -166,11 +166,9 @@ namespace ctml { */ #ifndef WIN32 string sss = sleep(); -#ifdef DEBUG_PATHS - writelog("sleeping for " + sss + " secs+\n"); -#endif - if (debug > 0) - writelog("sleeping for " + sss + " secs+\n"); + if (debug > 0) { + writelog("sleeping for " + sss + " secs+\n"); + } cmd = "sleep " + sss; try { ierr = system(cmd.c_str()); @@ -200,7 +198,7 @@ namespace ctml { ferr.close(); } else { - if (debug > 0) { + if (debug > 0) { writelog("cannot open ct2ctml.log for reading.\n"); } } @@ -227,15 +225,9 @@ namespace ctml { writelog("ct2ctml: retaining temporary file "+path+"\n"); } #else - writelog("ct2ctml: retaining temporary file "+path+"\n"); - //#else - //cmd = "rm -f \"" + path + "\""; - //try { - // if (ierr == 0) - // system(cmd.c_str()); - //} - //catch (...) { ; } - //#endif + if (debug > 0) { + writelog("ct2ctml: retaining temporary file "+path+"\n"); + } #endif } @@ -250,10 +242,11 @@ namespace ctml { * @param debug Turn on debugging printing */ void get_CTML_Tree(Cantera::XML_Node* rootPtr, const std::string file, const int debug) { - std::string ff, ext = ""; + + std::string ff, ext = ""; // find the input file on the Cantera search path - std::string inname = findInputFile(file); + std::string inname = findInputFile(file); #ifdef DEBUG_PATHS writelog("Found file: "+inname+"\n"); #endif @@ -274,8 +267,8 @@ namespace ctml { } if (ext != ".xml" && ext != ".ctml") { try { - ctml::ct2ctml(inname.c_str(), 1); - } + ctml::ct2ctml(inname.c_str(), debug); + } catch (...) { writelog("get_CTML_Tree: caught something \n");; } diff --git a/Cantera/src/base/misc.cpp b/Cantera/src/base/misc.cpp index 566fceb17..d0dcaf49e 100755 --- a/Cantera/src/base/misc.cpp +++ b/Cantera/src/base/misc.cpp @@ -938,8 +938,8 @@ protected: XML_Node* get_XML_File(std::string file, int debug) { XML_Node* xtmp = app()->get_XML_File(file, debug) ; - //writelog("get_XML_File: returned from app:get_XML_FILE " + int2str(int(xtmp)) + "\n"); - return xtmp; + //writelog("get_XML_File: returned from app:get_XML_FILE " + int2str(int(xtmp)) + "\n"); + return xtmp; } XML_Node* Application::get_XML_File(std::string file, int debug) {