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

Andrew Walker arwalker at sumusltd.com
Tue Dec 16 01:20:14 CET 2003


CVS commit by arwalker: 

Removed compiler warnings
Defined KST_UNUSED


  M +41 -2     periodogram.c   1.5


--- kdeextragear-2/kst/plugins/periodogram/periodogram.c  #1.4:1.5
@@ -18,5 +18,40 @@
 #define TWO_PI  6.2831853071795858696103
 #define MACC    4.0
+#define KST_UNUSED(x) if(x){};
 
+int max( int a, int b );
+int min( int a, int b );
+void spread( double y, double yy[], unsigned long n, double x, int m );
+void four1( double data[], unsigned long nn, int isign );
+void realft( double data[], unsigned long n, int isign );
+void avevar( double const  data[], unsigned long n, double* ave, double* var );
+void FastLombPeriodogram(    
+    double const x[], 
+    double const y[], 
+    unsigned long   n, 
+    double          ofac, 
+    double          hifac, 
+    double          wk1[], 
+    double          wk2[], 
+    unsigned long   ndim,
+    unsigned long*  nout, 
+    unsigned long*  jmax, 
+    double*         prob,
+    double*         pvar,
+    int            iIsWindowFunction );
+void SlowLombPeriodogram(
+    double const    x[], 
+    double const    y[], 
+    unsigned long   n, 
+    double          ofac, 
+    double          hifac, 
+    double          px[], 
+    double          py[], 
+    unsigned long   ndim,
+    unsigned long*  nout, 
+    unsigned long*  jmax, 
+    double*         prob,
+    double*         pvar,
+    int            iIsWindowFunction );
 int periodogram( const double *const inArrays[], const int inArrayLens[],
                 const double is[],
@@ -420,4 +455,6 @@ void SlowLombPeriodogram(
     int            iIsWindowFunction )
 {        
+    KST_UNUSED( ndim )
+            
     unsigned long   i;
     unsigned long   j;
@@ -584,4 +621,6 @@ int periodogram( const double *const inA
                         double outScalars[] )
 {
+    KST_UNUSED( outScalars )
+    
     unsigned long lSizeWork;
     unsigned long lSizeOut = 0;
@@ -608,5 +647,5 @@ int periodogram( const double *const inA
             lSizeWork   = lFreq * 2;
            
-            if( outArrayLens[0] != lSizeWork )
+            if( lSizeIn != lSizeWork )
             {
                 pResult[0] = realloc( outArrays[0], lSizeWork * sizeof( double ) );
@@ -617,5 +656,5 @@ int periodogram( const double *const inA
             }
             
-            if( outArrayLens[1] != lSizeWork )
+            if( lSizeIn != lSizeWork )
             {
                 pResult[1] = realloc( outArrays[1], lSizeWork * sizeof( double ) );





More information about the Kst mailing list