options.cpp 627 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "rar.hpp"
  2. RAROptions::RAROptions()
  3. {
  4. Init();
  5. }
  6. RAROptions::~RAROptions()
  7. {
  8. // It is important for security reasons, so we do not have the unnecessary
  9. // password data left in memory.
  10. memset(this,0,sizeof(RAROptions));
  11. }
  12. void RAROptions::Init()
  13. {
  14. memset(this,0,sizeof(RAROptions));
  15. WinSize=0x2000000;
  16. Overwrite=OVERWRITE_DEFAULT;
  17. Method=3;
  18. MsgStream=MSG_STDOUT;
  19. ConvertNames=NAMES_ORIGINALCASE;
  20. xmtime=EXTTIME_MAX;
  21. FileSizeLess=INT64NDF;
  22. FileSizeMore=INT64NDF;
  23. HashType=HASH_CRC32;
  24. #ifdef RAR_SMP
  25. Threads=GetNumberOfThreads();
  26. #endif
  27. #ifdef USE_QOPEN
  28. QOpenMode=QOPEN_AUTO;
  29. #endif
  30. }