summaryrefslogtreecommitdiff
path: root/lib/ft4/ft4code.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-09-26 23:24:28 +0200
committerChristoph Berg <myon@debian.org>2026-09-26 23:24:28 +0200
commit69344560ea394c06ca94acac46a2e4c3e8b7b229 (patch)
treeebc98370a697a9bbd6b973a14fa5113c475c6db7 /lib/ft4/ft4code.f90
parent3e9d10a67671d0bd5c7b8c3ca8088f1818322eff (diff)
parent059831534c7e884f0a607ed86b582fd00d821731 (diff)
Update upstream source from tag 'upstream/3.2.0_rc1+dfsg'
Update to upstream version '3.2.0~rc1+dfsg' with Debian dir dbff457fd2c3616d5c77b863c7bfb2186ed86047
Diffstat (limited to 'lib/ft4/ft4code.f90')
-rw-r--r--lib/ft4/ft4code.f9013
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/ft4/ft4code.f90 b/lib/ft4/ft4code.f90
index 1792d9a2..7ebc10a2 100644
--- a/lib/ft4/ft4code.f90
+++ b/lib/ft4/ft4code.f90
@@ -12,6 +12,7 @@ program ft4code
character*77 c77
character*9 comment
character bad*1,msgtype*18
+ integer pack_status
integer itone(NN)
integer*1 msgbits(77),rvec(77),codeword(174)
data rvec/0,1,0,0,1,0,1,0,0,1,0,1,1,1,1,0,1,0,0,0,1,0,0,1,1,0,1,1,0, &
@@ -46,10 +47,16 @@ program ft4code
if(nmsg.gt.1) msg=testmsg(imsg)
! Generate msgsent, msgbits, and itone
- i3=-1
- n3=-1
- call pack77(msg,i3,n3,c77)
call genft4(msg,0,msgsent,msgbits,itone)
+ if(trim(msgsent).eq.'*** bad message ***') then
+ print*,'Cannot encode message: ',trim(msg)
+ stop 1
+ endif
+ call pack77(msgsent,i3,n3,c77,status=pack_status)
+ if(pack_status.ne.PACK77_STATUS_ENCODED) then
+ print*,'Cannot encode message: ',trim(msg)
+ stop 1
+ endif
call encode174_91(msgbits,codeword)
msgtype=""
if(i3.eq.0) then