mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-02 05:54:41 -04:00
Get rid of jt9com and npar common blocks
Also use correct C binding and have compilers determine sizes and offsets. The wsjtx.exe program now owns the decoder shared data that is shared with symspec. It is now in struct dec_data, still a global variable for now but hopefully a MainWindow member variable soon. The struct dec_data (in both C/C++ and Fortran) has a sub structure with the decoder parameters which enables copying and manipulating a lot cleaner. New of changed types of shared data must still be modified in commons.h and a new file lib/jt9com.f90, they must stay in sync as a pointer to the structure is passed between C and Fortran. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6290 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+4
-6
@@ -3,6 +3,8 @@
|
||||
#include <QSharedMemory>
|
||||
#include <QSystemSemaphore>
|
||||
|
||||
#include "../commons.h"
|
||||
|
||||
// Multiple instances: KK1D, 17 Jul 2013
|
||||
QSharedMemory mem_jt9;
|
||||
|
||||
@@ -16,17 +18,13 @@ extern "C" {
|
||||
bool detach_jt9_();
|
||||
bool lock_jt9_();
|
||||
bool unlock_jt9_();
|
||||
char* address_jt9_();
|
||||
struct jt9com * address_jt9_();
|
||||
int size_jt9_();
|
||||
// Multiple instances: wrapper for QSharedMemory::setKey()
|
||||
bool setkey_jt9_(char* mykey, int mykey_len);
|
||||
|
||||
bool acquire_jt9_();
|
||||
bool release_jt9_();
|
||||
|
||||
extern struct {
|
||||
char c[10];
|
||||
} jt9com_;
|
||||
}
|
||||
|
||||
bool attach_jt9_() {return mem_jt9.attach();}
|
||||
@@ -34,7 +32,7 @@ bool create_jt9_(int nsize) {return mem_jt9.create(nsize);}
|
||||
bool detach_jt9_() {return mem_jt9.detach();}
|
||||
bool lock_jt9_() {return mem_jt9.lock();}
|
||||
bool unlock_jt9_() {return mem_jt9.unlock();}
|
||||
char* address_jt9_() {return (char*)mem_jt9.constData();}
|
||||
struct jt9com * address_jt9_() {return reinterpret_cast<struct jt9com *>(mem_jt9.data());}
|
||||
int size_jt9_() {return (int)mem_jt9.size();}
|
||||
|
||||
// Multiple instances:
|
||||
|
||||
Reference in New Issue
Block a user