summaryrefslogtreecommitdiff
path: root/lib/jtty/jtty_source_codec.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-10-09 14:12:35 +0200
committerChristoph Berg <myon@debian.org>2026-10-09 14:12:35 +0200
commitffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch)
tree1269efa852935b183daae4bb33a58d1b4d2ffb53 /lib/jtty/jtty_source_codec.f90
parent059831534c7e884f0a607ed86b582fd00d821731 (diff)
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
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