- /* sncfile.h by K.Tsuru */
- /************************************************
- It provides a method which automatically update
- constant files.
- *************************************************/
- #ifndef SNC_FILE_H
- #define SNC_FILE_H
-
- // If you don't use constant files, change this value to 0.
- #define UsesSNConstantFile 1
-
- /*************************************************
- Definition of directory for three constant files
- "e.snc", "pi.snc" and "log10.snc".
- **************************************************/
- #ifndef __unix__
- #define SNC_DIR ".\\snconst\\"
- #define DIR_DLMT '\\' // delimiter of directory
- #else
- #define SNC_DIR "./snconst/"
- #define DIR_DLMT '/'
- #endif
-
- #define SNC_MAX_PATH 260
-
- // definition of file names
- #define E_FILE "e.snc" // E()
- #define Log10_FILE "log10.snc" // Log10()
- #define Pi_FILE "pi.snc" // Pi()
- /******************************************************
- It searches the directory "SNC_DIR" in the current (./)
- or upper (../) directory.
- If neither "SNC_DIR" nor "*.snc" file is found, it
- neither create nor update the constant file.
- *******************************************************/
- bool ExistSncDirectory(char* sncDir); // set found directory in "sncDir"
- bool ExistDirectory(const char* const dir);
- bool ExistFile(const char* const fname);
- char* LastChar(const char* s);
-
- /*************************************************************
- fname = "e.snc", "log10.snc" or "pi.snc"
- If there is not the directory "SNC_DIR", it searches "*.snc"
- file in the current directory only.
- return NO_SNC_FILE: Neither "SNC_DIR" nor "*.snc" file exists.
- return SNC_ENOUGH : The constant file has enough length.
- return SNC_UPDATE : The constant file has been updated.
- ***************************************************************/
- enum { NO_SNC_FILE =0, SNC_ENOUGH, SNC_UPDATE };
- int UpdateConstantFile(const char* fname,
- SDouble (*pfunc)(const SDouble* c, SDouble (*pf)()),
- SDouble (*pfCalcFunc)(), uint ef); // 3701
-
- #endif //SNC_FILE_H
sncfile.h : last modifiled at 2016/09/04 14:21:36(2,030 bytes)
created at 2016/04/11 11:18:58
The creation time of this html file is 2017/10/11 16:07:52 (Wed Oct 11 16:07:52 2017).