*** empty log message ***

This commit is contained in:
Dave Goodwin 2004-08-01 20:58:32 +00:00
parent ecef36e4ee
commit d576705751

View file

@ -45,7 +45,9 @@ namespace ctml {
} }
static bool checkPython() { static bool checkPython() {
string path = tmpDir() + "/.check.pyw"; time_t aclock;
time( &aclock );
string path = tmpDir() + "/.check"+int2str(aclock)+".pyw";
ofstream f(path.c_str()); ofstream f(path.c_str());
if (!f) { if (!f) {
throw CanteraError("checkPython","cannot open "+path+" for writing"); throw CanteraError("checkPython","cannot open "+path+" for writing");
@ -78,20 +80,25 @@ namespace ctml {
catch (...) { catch (...) {
return false; return false;
} }
#ifdef WIN32
cmd = "cmd /C rm " + path;
#else
cmd = "rm -f " + path;
try {
system(cmd.c_str());
}
catch (...) { ; }
#endif
return true; return true;
} }
void ct2ctml(const char* file) { void ct2ctml(const char* file) {
int irnd = rand();
struct tm *newtime;
time_t aclock; time_t aclock;
time( &aclock ); time( &aclock );
cout << "aclock = " << aclock << endl;
cout << rand() << endl;
string path = tmpDir()+"/.cttmp.pyw"; string path = tmpDir()+"/.cttmp"+int2str(aclock)+".pyw";
ofstream f(path.c_str()); ofstream f(path.c_str());
if (!f) { if (!f) {
throw CanteraError("ct2ctml","cannot open "+path+" for writing."); throw CanteraError("ct2ctml","cannot open "+path+" for writing.");
@ -148,6 +155,15 @@ namespace ctml {
"could not convert input file to CTML\n " "could not convert input file to CTML\n "
"command line was: " + msg); "command line was: " + msg);
} }
#ifdef WIN32
cmd = "cmd /C rm " + path;
#else
cmd = "rm -f " + path;
try {
system(cmd.c_str());
}
catch (...) { ; }
#endif
} }