mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-11 02:09:03 -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:
@@ -28,6 +28,7 @@
|
||||
#include "SettingsGroup.hpp"
|
||||
#include "TraceFile.hpp"
|
||||
#include "mainwindow.h"
|
||||
#include "commons.h"
|
||||
#include "lib/init_random_seed.h"
|
||||
|
||||
namespace
|
||||
@@ -181,16 +182,12 @@ int main(int argc, char *argv[])
|
||||
mem_jt9.setKey(a.applicationName ());
|
||||
|
||||
if(!mem_jt9.attach()) {
|
||||
if (!mem_jt9.create(sizeof(jt9com_))) {
|
||||
if (!mem_jt9.create(sizeof(struct dec_data))) {
|
||||
QMessageBox::critical (nullptr, "Error", "Unable to create shared memory segment.");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
char *to = (char*)mem_jt9.data();
|
||||
int size=sizeof(jt9com_);
|
||||
if(jt9com_.newdat==0) {
|
||||
}
|
||||
memset(to,0,size); //Zero all decoding params in shared memory
|
||||
memset(mem_jt9.data(),0,sizeof(struct dec_data)); //Zero all decoding params in shared memory
|
||||
|
||||
unsigned downSampleFactor;
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user