Преглед изворни кода

* Placed fftw_getmem and fftw_freemem in interface section
* Removed dependency on libraries that are not directly called
* Fixed compilation of example (part of bug #12881)

git-svn-id: trunk@12505 -

joost пре 16 година
родитељ
комит
66dfc61eaa
2 измењених фајлова са 9 додато и 7 уклоњено
  1. 2 2
      packages/fftw/examples/example.pas
  2. 7 5
      packages/fftw/src/fftw_s.pas

+ 2 - 2
packages/fftw/examples/example.pas

@@ -1,6 +1,6 @@
 program example;
 program example;
 
 
-uses fftw;
+uses fftw_s;
 
 
 const s=128;
 const s=128;
 
 
@@ -28,4 +28,4 @@ begin
   fftw_destroy_plan(p);
   fftw_destroy_plan(p);
   fftw_freemem(i);
   fftw_freemem(i);
   fftw_freemem(o);
   fftw_freemem(o);
-end.
+end.

+ 7 - 5
packages/fftw/src/fftw_s.pas

@@ -94,6 +94,10 @@ procedure fftw_destroy_plan(plan:fftw_plan_single);
 procedure fftw_execute(plan:fftw_plan_single);
 procedure fftw_execute(plan:fftw_plan_single);
           external 'fftw3f' name 'fftwf_execute';
           external 'fftw3f' name 'fftwf_execute';
 
 
+{$calling register} {Back to normal!}
+procedure fftw_getmem(var p:pointer;size:sizeint);
+procedure fftw_freemem(p:pointer);inline;
+
 {*****************************************************************************}
 {*****************************************************************************}
                                   implementation
                                   implementation
 {*****************************************************************************}
 {*****************************************************************************}
@@ -101,11 +105,9 @@ procedure fftw_execute(plan:fftw_plan_single);
 {$LINKLIB fftw3f}
 {$LINKLIB fftw3f}
 
 
 {Required libraries by libfftw3}
 {Required libraries by libfftw3}
-{$LINKLIB gcc}
-{$LINKLIB c}
-{$LINKLIB m}
-
-{$calling register} {Back to normal!}
+{ $LINKLIB gcc}
+{ $LINKLIB c}
+{ $LINKLIB m}
 
 
 {Better don't use fftw_malloc and fftw_free, but provide Pascal replacements.}
 {Better don't use fftw_malloc and fftw_free, but provide Pascal replacements.}