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