summaryrefslogtreecommitdiff
path: root/lib/jtty/jtty_source_codec.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-10-09 14:12:49 +0200
committerChristoph Berg <myon@debian.org>2026-10-09 14:12:49 +0200
commit76956486fa7ef52a51d4e56df1e13a9f19a6c93c (patch)
treefe0c394439fdc167d1970372e8998874090854dd /lib/jtty/jtty_source_codec.f90
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
parentffc62c792c9a5196cb4ce7a353287dfe20db6524 (diff)
Update upstream source from tag 'upstream/3.3.0_beta1+dfsg'
Update to upstream version '3.3.0~beta1+dfsg' with Debian dir 85037bbb9376721108594b59b54ead82ac6924a3
Diffstat (limited to 'lib/jtty/jtty_source_codec.f90')
-rw-r--r--lib/jtty/jtty_source_codec.f908
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/jtty/jtty_source_codec.f90 b/lib/jtty/jtty_source_codec.f90
index e73a62ad..0a3f6193 100644
--- a/lib/jtty/jtty_source_codec.f90
+++ b/lib/jtty/jtty_source_codec.f90
@@ -388,18 +388,22 @@ type(jtty_source_atom) function jtty_text5_atom(text) result(atom)
if(n.gt.0) atom%text(1:n)=text(1:n)
end function jtty_text5_atom
-subroutine pack_jtty_atoms(atoms,natoms,frames,nframes,valid)
+subroutine pack_jtty_atoms(atoms,natoms,frames,nframes,valid,is_final)
type(jtty_source_atom), intent(in) :: atoms(:)
integer, intent(in) :: natoms
character(len=34), intent(out) :: frames(:)
integer, intent(out) :: nframes
logical, intent(out) :: valid
+ integer, intent(in), optional :: is_final !0/1; absent means final (existing behavior)
integer :: i
+ logical :: final_ok
frames=''; nframes=0
valid=natoms.ge.1 .and. natoms.le.16 .and. natoms.le.size(atoms) .and. natoms.le.size(frames)
if(.not.valid) return
+ final_ok=.true.
+ if(present(is_final)) final_ok=is_final.ne.0
do i=1,natoms
- call pack_jtty_atom(atoms(i),frames(i),i.eq.natoms,valid)
+ call pack_jtty_atom(atoms(i),frames(i),i.eq.natoms .and. final_ok,valid)
if(.not.valid) then; frames=''; return; endif
enddo
nframes=natoms