removed vauge mathcrt.lib

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4953 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-02-23 15:10:42 +00:00
parent f47ce901b2
commit e80b4d084c
9 changed files with 58 additions and 381 deletions

View file

@ -1,5 +1,4 @@
#include <windows.h>
#include "mathcrt.h"
#include "MyMath.h"
#include "Math.h"
@ -197,11 +196,22 @@ void itoa64(__int64 i, char *buffer)
}
#define _FLOAT_ROUND_ADJUST (double)5e-15
extern "C"
int _floatp10(double *fnum, int *fsign, int prec);
extern "C"
int _ftol(double num);
int _floatp10(double *fnum, int *fsign, int prec)
{
int fpower, _d;
fcvt(*fnum, prec, &fpower, &_d);
if (*fnum < 0)
*fsign = -1;
else
*fsign = 1;
return fpower;
}
#define POS_INFINITY "#INF"
#define NEG_INFINITY "-#INF"
@ -314,6 +324,8 @@ void FloatFormat(char *s, double value, int options)
{
int prec = options & 0xF;
*s = 0;
if(value == HUGE_VAL)
{
lstrcpy(s, POS_INFINITY);
@ -323,7 +335,18 @@ void FloatFormat(char *s, double value, int options)
return;
}
if (options & FF_NOEXP) FloatFormatF(s, value, prec);
int decpt, sign;
char *res = fcvt(value, prec, &decpt, &sign);
if (res)
{
lstrcpyn(s, res, decpt + 1);
lstrcat(s, ".");
lstrcpy(s + decpt + 1, res + decpt);
}
/*if (options & FF_NOEXP) FloatFormatF(s, value, prec);
else
if (options & FF_EXP) FloatFormatE(s, value, options);
else
@ -342,7 +365,7 @@ void FloatFormat(char *s, double value, int options)
if(prec <= 0) prec = 1;
FloatFormatF(s, value, prec);
}
}
}*/
}
int lstrcmpn(char *s1, const char *s2, int chars)