[Kst] kdeextragear-2/kst/plugins/demo

George Staikos staikos at kde.org
Fri May 16 08:22:13 CEST 2003


CVS commit by staikos: 

make it do what the xml file says it does


  M +11 -10    sindemo.c   1.2


--- kdeextragear-2/kst/plugins/demo/sindemo.c  #1.1:1.2
@@ -3,16 +3,17 @@
 
 
-int sindemo(int incnt, double *in, int *outcnt, double **out) {
+int sindemo(const double *const inArrays[], const int inArrayLens[],
+                const double inScalars[],
+                double *outArrays[], int outArrayLens[],
+                double outScalars[])
+{
         int i;
+        int j;
 
-        if (!outcnt || !out) {
-                return -1;
+        for (i = 0; i < 2; i++) {
+                outArrayLens[i] = inArrayLens[i];
+                for (j = 0; j < inArrayLens[i]; j++) {
+                        outArrays[i][j] = sin(inArrays[i][j]);
         }
-
-        *out = malloc(incnt * sizeof(double));
-        *outcnt = incnt;
-
-        for (i = 0; i < incnt; i++) {
-                *out[i] = sin(in[i]);
         }
 




More information about the Kst mailing list