<< "variable TEMPS is set - ignoring INPUTS and OUTPUTS" << endl;
<< "will clean file listed in variable TEMPS" << endl;
void cleanFiles(){  cerr << "Last step: erasing temp files" << endl;  logFile << timeStr() << "Last step: erasing temp file" << endl;    if (variables.find("TEMPS") != variables.end()){  // the easy way    set<string> temps = splitBlank(variables["TEMPS"]);    logFile << timeStr() 	    << "variable TEMPS is set - ignoring INPUTS and OUTPUTS" << endl;    for (set<string>::iterator t = temps.begin(); t != temps.end(); t++){      logFile << timeStr() << "removing " << *t << endl;      if (unlink((*t).c_str()) < 0){	logFile << timeStr() << "cannot remove file: " << *t << endl;	continue;      }    }    return;  }  logFile << timeStr() 	  << "variable TEMPS is not set - no cleaning done" << endl;//   if (variables.find("INPUTS") == variables.end() ||//       variables.find("OUTPUTS") == variables.end()){//     logFile << timeStr() << "variables INPUTS and OUTPUTS must both be set in order to use -clean" << endl;//     cerr << "variables INPUTS and OUTPUTS must both be set in order to use -clean" << endl;//     finish(1);//   }  //   set<string> inputs = splitBlank(variables["INPUTS"]);//   set<string> outputs = splitBlank(variables["OUTPUTS"]);  //   if (inputs.size() == 0 || outputs.size() == 0){//     logFile << timeStr() << "variables INPUTS and OUTPUTS must both be non-empty in order to use -ocd" << endl;//     cerr << "variables INPUTS and OUTPUTS must both be non-empty in order to use -ocd" << endl;//     finish(1);//   }//   inputs.insert(confFile);     // make sure we don't erase ourselves//   outputs.insert(logFileName); // or the log file//   DIR * thisdir = opendir(".");//   if (thisdir == NULL){//     logFile << timeStr() << "cannot open local dir - no cleaning will be done" // 	    << endl;//     cerr << "cannot open local dir - no cleaning will be done" << endl;//     return;//   }//   struct dirent * de;//   struct stat buf;//   while ((de = readdir(thisdir)) != NULL){//     if (de->d_name[0] == '.') { // directory or hidden file//       cerr << "skipping directory " << de->d_name << endl;//       continue;//     }//     if (lstat(de->d_name, &buf) < 0){//       logFile << timeStr() << "cannot stat file: " << de->d_name << endl;//       continue;//     }//     if (buf.st_ctime < allstart) { // file existed before we started running//       cerr << "skipping preexisting file " << de->d_name << " (" // 	   <<  buf.st_ctime << " < " << allstart << ")" << endl;//       continue;//     }//     if (inputs.find(string(de->d_name)) != inputs.end() ||// 	outputs.find(string(de->d_name)) != outputs.end()) // file in INPUTS or OUTPUTS//       continue;//     logFile << timeStr() << "removing " << de->d_name << endl;//     // if all else fails, we erase the file//     if (unlink(de->d_name) < 0){//       logFile << timeStr() << "cannot remove file: " << de->d_name << endl;//       continue;//     }//   }}