subroutine push_char(c)
implicit none
character(kind=CK,len=1),intent(in) :: c
character(kind=CK,len=max_numeric_str_len) :: istr
if (.not. exception_thrown) then
if (use_unformatted_stream) then
!in this case, c is ignored, and we just
!decrement the stream position counter:
ipos = ipos - 1
else
pushed_index = pushed_index + 1
if (pushed_index>0 .and. pushed_index<=len(pushed_char)) then
pushed_char(pushed_index:pushed_index) = c
else
call integer_to_string(pushed_index,istr)
call throw_exception('Error in push_char: '//&
'invalid valid of pushed_index: '//trim(istr))
end if
end if
end if
end subroutine push_char