declare real calc_percent()'s code just once

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5355 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-11-09 15:30:08 +00:00
parent 3e2eef6cc2
commit fb217c5b5c

View file

@ -68,13 +68,14 @@ static int dbd_size, dbd_pos, dbd_srcpos, dbd_fulllen;
static int m_length;
static int m_pos;
#define _calc_percent() (MulDiv(min(m_pos,m_length),100,m_length))
#ifdef NSIS_COMPRESS_WHOLE
int NSISCALL calc_percent()
static int NSISCALL calc_percent()
{
return MulDiv(min(m_pos,m_length),100,m_length);
return _calc_percent();
}
#else
#define calc_percent() (MulDiv(min(m_pos,m_length),100,m_length))
#define calc_percent() _calc_percent()
#endif
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT