diff options
| author | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:06 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:06 +0100 |
| commit | 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 (patch) | |
| tree | fbfdfe6bcb0a8a114be2480dac53d88c977e4869 /lib/jt4code.f90 | |
| parent | 4320ce238aae1fe87fc9f379cdd816e9317885fa (diff) | |
New upstream version 2.7.0~rc8+repackupstream/2.7.0_rc8+repack
Diffstat (limited to 'lib/jt4code.f90')
| -rwxr-xr-x | lib/jt4code.f90 | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/lib/jt4code.f90 b/lib/jt4code.f90 index 9d709571..e11f6144 100755 --- a/lib/jt4code.f90 +++ b/lib/jt4code.f90 @@ -1,50 +1,50 @@ -program jt4code
-
-! Provides examples of message packing, bit and symbol ordering,
-! convolutional encoding, and other necessary details of the JT4
-! protocol.
-
- use jt4
- use packjt
- character*22 msg,decoded,bad*1,msgtype*13
- integer i4tone(206)
- include 'testmsg.f90'
-
- nargs=iargc()
- if(nargs.ne.1) then
- print*,'Usage: jt4code "message"'
- print*,' jt4code -t'
- go to 999
- endif
-
- call getarg(1,msg)
- nmsg=1
- if(msg(1:2).eq."-t") nmsg=NTEST
-
- write(*,1010)
-1010 format(" Message Decoded Err? Type"/ &
- 74("-"))
- do imsg=1,nmsg
- if(nmsg.gt.1) msg=testmsg(imsg)
- call fmtmsg(msg,iz) !To upper case, collapse multiple blanks
- ichk=0
- call gen4(msg,ichk,decoded,i4tone,itype)
-
- msgtype=""
- if(itype.eq.1) msgtype="Std Msg"
- if(itype.eq.2) msgtype="Type 1 prefix"
- if(itype.eq.3) msgtype="Type 1 suffix"
- if(itype.eq.4) msgtype="Type 2 prefix"
- if(itype.eq.5) msgtype="Type 2 suffix"
- if(itype.eq.6) msgtype="Free text"
-
- bad=" "
- if(decoded.ne.msg) bad="*"
- write(*,1020) imsg,msg,decoded,bad,itype,msgtype
-1020 format(i2,'.',2x,a22,2x,a22,3x,a1,i3,": ",a13)
- enddo
-
- if(nmsg.eq.1) write(*,1030) i4tone
-1030 format(/'Channel symbols'/(30i2))
-
-999 end program jt4code
+program jt4code + +! Provides examples of message packing, bit and symbol ordering, +! convolutional encoding, and other necessary details of the JT4 +! protocol. + + use jt4 + use packjt + character*22 msg,decoded,bad*1,msgtype*13 + integer i4tone(206) + include 'testmsg.f90' + + nargs=iargc() + if(nargs.ne.1) then + print*,'Usage: jt4code "message"' + print*,' jt4code -t' + go to 999 + endif + + call getarg(1,msg) + nmsg=1 + if(msg(1:2).eq."-t") nmsg=NTEST + + write(*,1010) +1010 format(" Message Decoded Err? Type"/ & + 74("-")) + do imsg=1,nmsg + if(nmsg.gt.1) msg=testmsg(imsg) + call fmtmsg(msg,iz) !To upper case, collapse multiple blanks + ichk=0 + call gen4(msg,ichk,decoded,i4tone,itype) + + msgtype="" + if(itype.eq.1) msgtype="Std Msg" + if(itype.eq.2) msgtype="Type 1 prefix" + if(itype.eq.3) msgtype="Type 1 suffix" + if(itype.eq.4) msgtype="Type 2 prefix" + if(itype.eq.5) msgtype="Type 2 suffix" + if(itype.eq.6) msgtype="Free text" + + bad=" " + if(decoded.ne.msg) bad="*" + write(*,1020) imsg,msg,decoded,bad,itype,msgtype +1020 format(i2,'.',2x,a22,2x,a22,3x,a1,i3,": ",a13) + enddo + + if(nmsg.eq.1) write(*,1030) i4tone +1030 format(/'Channel symbols'/(30i2)) + +999 end program jt4code |
