diff --git a/include/cantera/base/global.h b/include/cantera/base/global.h index d4c743b3e..3b3f4c210 100644 --- a/include/cantera/base/global.h +++ b/include/cantera/base/global.h @@ -210,37 +210,6 @@ void thread_complete() ; */ std::string canteraRoot(); -//! Sets the temporary file directory. -/*! - * The default is to use the - * directory specified by environment variable TMP or TEMP. If neither - * of these are defined, then the current working directory will be - * used for temporary files. Call this function to specify some other - * place to put temporary files. - * - * @ingroup inputfiles - * - * @param tmp String name for the temporary directory - */ -void setTmpDir(std::string tmp); - -//! Retrieves the directory name where temporary files are created -/*! - * @ingroup inputfiles - * @return - * Returns a string containing the directory name - */ -std::string tmpDir(); - -//! Delay time in seconds. -/*! - * @return - * Returns the length of time in seconds for calls to the - * sleep function. - * @ingroup inputfiles - */ -std::string sleep(); - /*! * @defgroup logs Diagnostic Output * diff --git a/src/base/application.cpp b/src/base/application.cpp index 060c4d5ff..7598359d6 100644 --- a/src/base/application.cpp +++ b/src/base/application.cpp @@ -376,33 +376,11 @@ Application::Application() : inputDirs(0), stop_on_error(false), options(), - tmp_dir("."), xmlfiles(), - m_sleep("1"), pMessenger() { #if !defined( THREAD_SAFE_CANTERA ) pMessenger = std::auto_ptr(new Messages()); #endif - // if TMP or TEMP is set, use it for the temporary - // directory - char* ctmpdir = getenv("CANTERA_TMPDIR"); - if (ctmpdir != 0) { - tmp_dir = std::string(ctmpdir); - } else { - char* tmpdir = getenv("TMP"); - if (tmpdir == 0) { - tmpdir = getenv("TEMP"); - } - if (tmpdir != 0) { - tmp_dir = std::string(tmpdir); - } - } - - // if SLEEP is set, use it as the sleep time - char* sleepstr = getenv("SLEEP"); - if (sleepstr != 0) { - m_sleep = std::string(sleepstr); - } // install a default logwriter that writes to standard // output / standard error @@ -590,24 +568,6 @@ long int Application::readStringRegistryKey(const std::string& keyName, const st } #endif -void Application::setTmpDir(std::string tmp) -{ - APP_LOCK(); - tmp_dir = tmp ; -} - -std::string Application::getTmpDir() -{ - APP_LOCK(); - return tmp_dir ; -} - -std::string Application::sleep() -{ - APP_LOCK(); - return m_sleep ; -} - void Application::Messages::popError() { if (static_cast(errorMessage.size()) > 0) { diff --git a/src/base/application.h b/src/base/application.h index 89d072af0..3b2dae26b 100644 --- a/src/base/application.h +++ b/src/base/application.h @@ -376,21 +376,6 @@ public: //! Static function that destroys the application class's data static void ApplicationDestroy(); - //! Set the directory where temporary files may be written. - /*! - * @param tmp Name of the directory - */ - void setTmpDir(std::string tmp) ; - - //! get the name of a directory where temporary files may be written. - std::string getTmpDir() ; - - //! Pause the application for a certain amount - /*! - * This has been needed in the past for some network file systems. - */ - std::string sleep() ; - //! Set an error condition in the application class without //! throwing an exception. /*! @@ -756,8 +741,6 @@ protected: std::string tmp_dir; //! Current vector of xml file trees that have been previously parsed std::map xmlfiles; - //! Current sleep command. - std::string m_sleep; //! Current pointer to the logwriter //Logger* logwriter; #ifdef WITH_HTML_LOGS diff --git a/src/base/ct2ctml.cpp b/src/base/ct2ctml.cpp index 212ba0a41..787f78750 100644 --- a/src/base/ct2ctml.cpp +++ b/src/base/ct2ctml.cpp @@ -18,13 +18,6 @@ #include #include -// These defines are needed for the windows Sleep() function -// - comment them out if you don't want the Sleep function. -//#ifdef _WIN32 -//#include "Windows.h" -//#include "Winbase.h" -//#endif - using namespace Cantera; using namespace std; diff --git a/src/base/global.cpp b/src/base/global.cpp index 0afd5816c..c267e43cf 100644 --- a/src/base/global.cpp +++ b/src/base/global.cpp @@ -146,21 +146,6 @@ void close_XML_File(std::string file) app()->close_XML_File(file) ; } -void setTmpDir(std::string tmp) -{ - app()->setTmpDir(tmp); -} - -string tmpDir() -{ - return app()->getTmpDir(); -} - -string sleep() -{ - return app()->sleep(); -} - int nErrors() { return app()->getErrorCount();