[Kst] [Bug 64926] included plugin linefit does not compile

George Staikos staikos at kde.org
Thu Sep 25 19:26:38 CEST 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=64926     
staikos at kde.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From staikos at kde.org  2003-09-25 19:26 -------
Subject: kdeextragear-2/kst/plugins/linefit

CVS commit by staikos: 

lrint() not portable enough.  rint() should be sufficient here anyways.

CCMAIL: 64926-done at bugs.kde.org


  M +10 -2     linefit.c   1.9


--- kdeextragear-2/kst/plugins/linefit/linefit.c  #1.8:1.9
@@ -13,4 +13,10 @@
 #define Y 1
 
+
+int linefit(const double *const inArrays[], const int inArrayLens[],
+                const double is[],
+                double *outArrays[], int outArrayLens[],
+                double outScalars[]);
+
 int linefit(const double *const inArrays[], const int inArrayLens[],
                 const double is[],
@@ -22,4 +28,6 @@ int linefit(const double *const inArrays
         double xScale;
 
+        if (is) {} /* don't warn */
+
         if (inArrayLens[Y] < 1 || inArrayLens[X] < 1) {
                 return -1;
@@ -49,5 +57,5 @@ int linefit(const double *const inArrays
         for (i = 0; i < inArrayLens[Y]; i++) {
                 double z = xScale*i;
-                long int idx = lrint(z);
+                long int idx = rint(z);
                 double skew = z - floor(z); /* [0..1] */
                 long int idx2 = idx + 1;
@@ -79,5 +87,5 @@ int linefit(const double *const inArrays
         for (i = 0; i < inArrayLens[X]; i++) {
                 double z = xScale*i;
-                long int idx = lrint(z);
+                long int idx = rint(z);
                 double skew = z - floor(z); /* [0..1] */
                 long int idx2 = idx + 1;


More information about the Kst mailing list