Skip to content

Commit

Permalink
working on close
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Nov 25, 2024
1 parent 5353eec commit 2575188
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions src/g2cf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,19 @@ end function g2cf_open_index
!> @return 0 for success, error code otherwise.
!>
!> @author Edward Hartnett @date 2024-06-12
function g2cf_close(g2id) result(status)
use iso_c_binding
use g2c_interface
implicit none
! function g2cf_close(g2id) result(status)
! use iso_c_binding
! use g2c_interface
! implicit none

integer, intent(in) :: g2id
integer :: status
! integer, intent(in) :: g2id
! integer :: status

integer(c_int) :: cg2id, cstatus
! integer(c_int) :: cg2id, cstatus

cg2id = g2id
cstatus = g2c_close(cg2id)
status = cstatus
end function g2cf_close
! cg2id = g2id
! cstatus = g2c_close(cg2id)
! status = cstatus
! end function g2cf_close

end module g2cf
4 changes: 2 additions & 2 deletions tests/test_g2cf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ program test_g2cf
! subcenter .ne. 0 .or. master_version .ne. 2 .or. local_version .ne. 1) stop 12

! Close the file.
ierr = g2cf_close(g2cid)
if (ierr .ne. 0) stop 20
! ierr = g2cf_close(g2cid)
! if (ierr .ne. 0) stop 20

print *, 'SUCCESS!'
end program test_g2cf

0 comments on commit 2575188

Please sign in to comment.