File: smallfn.cpp

package info (click to toggle)
unrar-nonfree 1%3A4.1.4-1%2Bdeb7u1
  • links: PTS
  • area: non-free
  • in suites: wheezy
  • size: 1,120 kB
  • sloc: cpp: 21,159; makefile: 32; sh: 10
file content (42 lines) | stat: -rw-r--r-- 653 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "rar.hpp"

int ToPercent(int64 N1,int64 N2)
{
  if (N2<N1)
    return(100);
  return(ToPercentUnlim(N1,N2));
}


// Allows the percent larger than 100.
int ToPercentUnlim(int64 N1,int64 N2)
{
  if (N2==0)
    return(0);
  return((int)(N1*100/N2));
}


void RARInitData()
{
  InitCRC();
  ErrHandler.Clean();
}


#ifdef _DJGPP
// Disable wildcard expansion in DJGPP DOS SFX module.
extern "C" char **__crt0_glob_function (char *arg) 
{ 
  return 0; 
}
#endif


#ifdef _DJGPP
// Disable environments variable loading in DJGPP DOS SFX module
// to reduce the module size.
extern "C" void __crt0_load_environment_file (char *progname) 
{ 
}
#endif