smallfn.cpp 695 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include "rar.hpp"
  2. int ToPercent(int64 N1,int64 N2)
  3. {
  4. if (N2<N1)
  5. return(100);
  6. return(ToPercentUnlim(N1,N2));
  7. }
  8. // Allows the percent larger than 100.
  9. int ToPercentUnlim(int64 N1,int64 N2)
  10. {
  11. if (N2==0)
  12. return(0);
  13. return((int)(N1*100/N2));
  14. }
  15. void RARInitData()
  16. {
  17. InitCRC();
  18. ErrHandler.Clean();
  19. }
  20. #ifdef _DJGPP
  21. // Disable wildcard expansion in DJGPP DOS SFX module.
  22. extern "C" char **__crt0_glob_function (char *arg)
  23. {
  24. return 0;
  25. }
  26. #endif
  27. #ifdef _DJGPP
  28. // Disable environments variable loading in DJGPP DOS SFX module
  29. // to reduce the module size.
  30. extern "C" void __crt0_load_environment_file (char *progname)
  31. {
  32. }
  33. #endif