1. /* sncfile.h by K.Tsuru */
  2. /************************************************
  3. It provides a method which automatically update
  4. constant files.
  5. *************************************************/
  6. #ifndef SNC_FILE_H
  7. #define SNC_FILE_H
  8. // If you don't use constant files, change this value to 0.
  9. #define UsesSNConstantFile 1
  10. /*************************************************
  11. Definition of directory for three constant files
  12. "e.snc", "pi.snc" and "log10.snc".
  13. **************************************************/
  14. #ifndef __unix__
  15. #define SNC_DIR ".\\snconst\\"
  16. #define DIR_DLMT '\\' // delimiter of directory
  17. #else
  18. #define SNC_DIR "./snconst/"
  19. #define DIR_DLMT '/'
  20. #endif
  21. #define SNC_MAX_PATH 260
  22. // definition of file names
  23. #define E_FILE "e.snc" // E()
  24. #define Log10_FILE "log10.snc" // Log10()
  25. #define Pi_FILE "pi.snc" // Pi()
  26. /******************************************************
  27. It searches the directory "SNC_DIR" in the current (./)
  28. or upper (../) directory.
  29. If neither "SNC_DIR" nor "*.snc" file is found, it
  30. neither create nor update the constant file.
  31. *******************************************************/
  32. bool ExistSncDirectory(char* sncDir); // set found directory in "sncDir"
  33. bool ExistDirectory(const char* const dir);
  34. bool ExistFile(const char* const fname);
  35. char* LastChar(const char* s);
  36. /*************************************************************
  37. fname = "e.snc", "log10.snc" or "pi.snc"
  38. If there is not the directory "SNC_DIR", it searches "*.snc"
  39. file in the current directory only.
  40. return NO_SNC_FILE: Neither "SNC_DIR" nor "*.snc" file exists.
  41. return SNC_ENOUGH : The constant file has enough length.
  42. return SNC_UPDATE : The constant file has been updated.
  43. ***************************************************************/
  44. enum { NO_SNC_FILE =0, SNC_ENOUGH, SNC_UPDATE };
  45. int UpdateConstantFile(const char* fname,
  46. SDouble (*pfunc)(const SDouble* c, SDouble (*pf)()),
  47. SDouble (*pfCalcFunc)(), uint ef); // 3701
  48. #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).