]> git.gag.com Git - fw/sdcc/commitdiff
Changed LF-LF-CR to LF-CR so visual studio stops complaining
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 9 Jun 2003 16:51:16 +0000 (16:51 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 9 Jun 2003 16:51:16 +0000 (16:51 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2685 4a8a32a2-be11-0410-ad9d-d568d2c75423

device/lib/asincosf.c
device/lib/atanf.c
device/lib/expf.c
device/lib/sincosf.c
device/lib/sincoshf.c

index b8005ecb54ef000da2f93e60d0e8cd57fb65a759..8bfdb790b53dd89564c3058c39f6cadd6997fa66 100644 (file)
 #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;
index a558948a61dedecab29a7c50a6f22d7b5b86b80f..ed70035c9c04b051bdd8409b1c63d698aaf99fac 100644 (file)
 #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)
index 083de0c2addaee9f8a6ccb2cde0d8ad21a64b966..d6557bc0a138a640958655fa50383f8570a1bd9a 100644 (file)
@@ -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; }
index e4ed08c06a0acb9390a7ba9a74774d016619010b..f3788ba0b9e241fb41198d935ff4b1e18005395c 100644 (file)
 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)
     {
index 4339ae98cba7099852fc43ec57c679b17b812a75..5143665d48e3846cff7e9f4702c67da917b21959 100644 (file)
 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; }