From ab8b6d0383dfd83a3b364d730417504e2ea1186d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 3 Aug 2016 19:04:21 +0000 Subject: [PATCH] Move ldpc temporary files into platform-independent location. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6991 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/genmsk144.f90 | 25 ++++++++++++------------- lib/genmsk40.f90 | 16 ++++++++-------- mainwindow.cpp | 1 - 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/lib/genmsk144.f90 b/lib/genmsk144.f90 index c4bbf3f0d..c00ad7a0d 100644 --- a/lib/genmsk144.f90 +++ b/lib/genmsk144.f90 @@ -52,14 +52,10 @@ subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype,pchk_file,ldpc_msg) i=index(pchk_file,".pchk") gen_file=pchk_file(1:i-1)//".gen" - i=index(ldpc_msg,'ldpc_msg') + i=index(ldpc_msg,"ldpc_msg") ldpc_cw=ldpc_msg(1:i-1)//"ldpc_cw" fname1=trim(ldpc_msg) fname2=trim(ldpc_cw) -! print*,'A ',fname1 -! fname1="ldpc_msg" -! fname2="ldpc_cw" -! print*,'B ',fname2 ! call init_ldpc(trim(pchk_file)//char(0),trim(gen_file)//char(0)) @@ -136,17 +132,20 @@ subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype,pchk_file,ldpc_msg) ! call ldpc_encode(msgbits,codeword) - open(19,file=fname1,status='unknown') - write(19,1010) msgbits +! print*,fname1 +! print*,fname2 + + open(24,file=fname1,status='unknown') + write(24,1010) msgbits 1010 format(80i1) - close(19) - cmnd='./encode '//trim(pchk_file)//' '//trim(gen_file)//' ' & - //trim(fname1)//' '//trim(fname2) + close(24) + cmnd='encode "'//trim(pchk_file)//'" "'//trim(gen_file)//'" "' & + //trim(fname1)//'" "'//trim(fname2)//'"' call system(cmnd) - open(19,file=fname2,status='old') - read(19,1020) codeword + open(24,file=fname2,status='old') + read(24,1020) codeword 1020 format(128i1) - close(19) + close(24) !Create 144-bit channel vector: !8-bit sync word + 48 bits + 8-bit sync word + 80 bits diff --git a/lib/genmsk40.f90 b/lib/genmsk40.f90 index 2a94299e3..f4500755e 100644 --- a/lib/genmsk40.f90 +++ b/lib/genmsk40.f90 @@ -65,17 +65,17 @@ subroutine genmsk40(msg,msgsent,ichk,itone,itype,pchk_file,fname1,fname2) enddo ! call ldpc_encode(message,codeword) - open(19,file=fname1,status='unknown') - write(19,1010) message + open(24,file=fname1,status='unknown') + write(24,1010) message 1010 format(16i1) - close(19) - cmnd='./encode '//trim(pchk_file40)//' '//trim(gen_file40)//' ' & - //trim(fname1)//' '//trim(fname2) + close(24) + cmnd='encode "'//trim(pchk_file40)//'" "'//trim(gen_file40)//'" "' & + //trim(fname1)//'" "'//trim(fname2)//'"' call system(cmnd) - open(19,file=fname2,status='unknown') - read(19,1020) codeword + open(24,file=fname2,status='old') + read(24,1020) codeword 1020 format(32i1) - close(19) + close(24) cwstring=" " do i=1,32 diff --git a/mainwindow.cpp b/mainwindow.cpp index 2b92ad123..31861d98c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -838,7 +838,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } QString ldpcMsgFile = m_config.temp_dir().absoluteFilePath("ldpc_msg"); - ldpcMsgFile = '"' + ldpcMsgFile + '"'; ba = ldpcMsgFile.toLocal8Bit(); for(int i=0; i<512; i++) { m_ldpcMsgFile[i]=32;