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:
Bill Somerville
2015-12-17 20:29:55 +00:00
parent b6327461a3
commit 722d4e6c4f
20 changed files with 550 additions and 523 deletions
+3 -6
View File
@@ -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;
{