From aa6707d3e3b6e449eb6b2299091cfaefe52ae849 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 6 May 2020 08:34:27 -0400 Subject: Fixed silly Fortran mistakes regarding functions returning allocated strings. Added an unused history system. Fixed URL handling. --- jessl.f90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'jessl.f90') diff --git a/jessl.f90 b/jessl.f90 index bd05d42..82d6465 100644 --- a/jessl.f90 +++ b/jessl.f90 @@ -148,11 +148,11 @@ contains end function ssl_write - function get_cipher(ssl) + subroutine get_cipher(ssl, res) use iso_c_binding implicit none - character(:), allocatable::get_cipher + character(:), allocatable, intent(out)::res type(c_ptr)::ssl type(c_ptr)::cptr @@ -164,8 +164,8 @@ contains cptr = c_null_ptr if(.not. c_associated(cptr)) then - allocate(character(len=1)::get_cipher) - get_cipher = " " + allocate(character(len=1)::res) + res = " " else @@ -175,15 +175,15 @@ contains do while(cstring(i) /= c_null_char) i = i + 1 end do - allocate(character(len=(i-1))::get_cipher) + allocate(character(len=(i-1))::res) i = 1 do while(cstring(i) /= c_null_char) - get_cipher(i:i) = cstring(i) + res(i:i) = cstring(i) end do end if - end function get_cipher + end subroutine get_cipher end module jessl -- cgit v1.2.3