From: jesusc Date: Mon, 9 Jun 2003 16:51:16 +0000 (+0000) Subject: Changed LF-LF-CR to LF-CR so visual studio stops complaining X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=7fbf4dd6fc639f70eaa15e0765d91df904c7e9f7;p=fw%2Fsdcc Changed LF-LF-CR to LF-CR so visual studio stops complaining git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2685 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/device/lib/asincosf.c b/device/lib/asincosf.c index b8005ecb..8bfdb790 100644 --- a/device/lib/asincosf.c +++ b/device/lib/asincosf.c @@ -33,12 +33,19 @@ #define P(g) (P2*g+P1) #define Q(g) ((Q2*g+Q1)*g+Q0) +#ifdef SDCC_mcs51 + #define myconst code +#else + #define myconst const +#endif + float asincosf(const float x, const int isacos) { float y, g, r; int i; - float a[2]={ 0.0, QUART_PI }; - float b[2]={ HALF_PI, QUART_PI }; + + static myconst float a[2]={ 0.0, QUART_PI }; + static myconst float b[2]={ HALF_PI, QUART_PI }; y=fabsf(x); i=isacos; diff --git a/device/lib/atanf.c b/device/lib/atanf.c index a558948a..ed70035c 100644 --- a/device/lib/atanf.c +++ b/device/lib/atanf.c @@ -36,11 +36,17 @@ #define K2 0.7320508076 /* sqrt(3)-1 */ #define K3 1.7320508076 /* sqrt(3) */ +#ifdef SDCC_mcs51 + #define myconst code +#else + #define myconst const +#endif + float atanf(const float x) reentrant { float f, r, g; int n=0; - static float a[]={ 0.0, 0.5235987756, 1.5707963268, 1.0471975512 }; + static myconst float a[]={ 0.0, 0.5235987756, 1.5707963268, 1.0471975512 }; f=fabsf(x); if(f>1.0) diff --git a/device/lib/expf.c b/device/lib/expf.c index 083de0c2..d6557bc0 100644 --- a/device/lib/expf.c +++ b/device/lib/expf.c @@ -43,7 +43,11 @@ float expf(const float x) { int n; float xn, g, r, z, y; - int sign; +#ifdef SDCC_mcs51 + bit sign; +#else + char sign; +#endif if(x>=0.0) { y=x; sign=0; } diff --git a/device/lib/sincosf.c b/device/lib/sincosf.c index e4ed08c0..f3788ba0 100644 --- a/device/lib/sincosf.c +++ b/device/lib/sincosf.c @@ -39,7 +39,12 @@ float sincosf(const float x, const int iscos) { float y, f, r, g, XN; - int N, sign; + int N; +#ifdef SDCC_mcs51 + bit sign; +#else + char sign; +#endif if(iscos) { diff --git a/device/lib/sincoshf.c b/device/lib/sincoshf.c index 4339ae98..5143665d 100644 --- a/device/lib/sincoshf.c +++ b/device/lib/sincoshf.c @@ -45,7 +45,11 @@ float sincoshf(const float x, const int iscosh) { float y, w, z; - int sign; +#ifdef SDCC_mcs51 + bit sign; +#else + char sign; +#endif if (x<0.0) { y=-x; sign=1; } else { y=x; sign=0; }