diff options
| author | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:12 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:12 +0100 |
| commit | 98c02f78b26811ba5d9962ba27ec24cacf82bb22 (patch) | |
| tree | daaf609cde31d8fb3b6c3457c43663d14f0dda80 /qmap/main.cpp | |
| parent | 332d2ce88c2f0bc2908cacdc6707e2f9fa49f26d (diff) | |
| parent | 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 (diff) | |
Update upstream source from tag 'upstream/2.7.0_rc8+repack'
Update to upstream version '2.7.0~rc8+repack'
with Debian dir 6fce941c8282d35c8df23d3de779a42e27688bc1
Diffstat (limited to 'qmap/main.cpp')
| -rwxr-xr-x | qmap/main.cpp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/qmap/main.cpp b/qmap/main.cpp index 1b42af24..3678b567 100755 --- a/qmap/main.cpp +++ b/qmap/main.cpp @@ -1,54 +1,54 @@ -#include <fftw3.h>
-#ifdef QT5
-#include <QtWidgets>
-#else
-#include <QtGui>
-#endif
-#include <QApplication>
-
-#include "revision_utils.hpp"
-#include "mainwindow.h"
-
-extern "C" {
- // Fortran procedures we need
- void four2a_ (_Complex float *, int * nfft, int * ndim, int * isign, int * iform, int len);
-
- void _gfortran_set_args(int argc, char *argv[]);
- void _gfortran_set_convert(int conv);
- void ftninit_(void);
- void fftbig_(float dd[], int* nfft);
-}
-
-int main(int argc, char *argv[])
-{
- QApplication a {argc, argv};
-
-// Initialize libgfortran:
- _gfortran_set_args(argc, argv);
- _gfortran_set_convert(0);
- ftninit_();
-
- // Override programs executable basename as application name.
- a.setApplicationName ("QMAP");
- a.setApplicationVersion ("0.4");
- // switch off as we share an Info.plist file with WSJT-X
- a.setAttribute (Qt::AA_DontUseNativeMenuBar);
- MainWindow w;
- w.show ();
- QObject::connect (&a, &QApplication::lastWindowClosed, &a, &QApplication::quit);
- auto result = a.exec ();
-
- // clean up lazily initialized FFTW3 resources
- {
- int nfft {-1};
- int ndim {1};
- int isign {1};
- int iform {1};
- // free FFT plan resources
- four2a_ (nullptr, &nfft, &ndim, &isign, &iform, 0);
- fftbig_(nullptr, &nfft);
- }
- fftwf_forget_wisdom ();
- fftwf_cleanup ();
- return result;
-}
+#include <fftw3.h> +#ifdef QT5 +#include <QtWidgets> +#else +#include <QtGui> +#endif +#include <QApplication> + +#include "revision_utils.hpp" +#include "mainwindow.h" + +extern "C" { + // Fortran procedures we need + void four2a_ (_Complex float *, int * nfft, int * ndim, int * isign, int * iform, int len); + + void _gfortran_set_args(int argc, char *argv[]); + void _gfortran_set_convert(int conv); + void ftninit_(void); + void fftbig_(float dd[], int* nfft); +} + +int main(int argc, char *argv[]) +{ + QApplication a {argc, argv}; + +// Initialize libgfortran: + _gfortran_set_args(argc, argv); + _gfortran_set_convert(0); + ftninit_(); + + // Override programs executable basename as application name. + a.setApplicationName ("QMAP"); + a.setApplicationVersion ("0.4"); + // switch off as we share an Info.plist file with WSJT-X + a.setAttribute (Qt::AA_DontUseNativeMenuBar); + MainWindow w; + w.show (); + QObject::connect (&a, &QApplication::lastWindowClosed, &a, &QApplication::quit); + auto result = a.exec (); + + // clean up lazily initialized FFTW3 resources + { + int nfft {-1}; + int ndim {1}; + int isign {1}; + int iform {1}; + // free FFT plan resources + four2a_ (nullptr, &nfft, &ndim, &isign, &iform, 0); + fftbig_(nullptr, &nfft); + } + fftwf_forget_wisdom (); + fftwf_cleanup (); + return result; +} |
