Skip to content

Commit

Permalink
Try to route around get_data_file (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Oct 7, 2024
1 parent df3c03f commit d58adeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion fortran/src/include/constants.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module constants
integer, parameter :: ERROR_UTILS_ALLOCATE_FAILED = 5

! file/string sizes
integer, parameter :: ANSWERS_TSV_SIZE = 2048
integer, parameter :: ANSWERT_STR_SIZE = 16
end module constants

8 changes: 4 additions & 4 deletions fortran/src/include/utils.f90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type(AnswerT) function get_answer(id) result(answer)

if (id < 1 .or. id > size(cached_answers)) then
print *, "Error: ID is out of bounds."
answer%type = errort
answer = AnswerT(0, '', errort)
return
end if

Expand All @@ -29,14 +29,14 @@ type(AnswerT) function get_answer(id) result(answer)
end function

subroutine init_answer_cache()
integer(i18t) :: i, j
integer :: ios, line_length, unit_number, file_size
character(len=64) :: line
character(len=32) :: val
character(len=4) :: id_, type_, length
integer(i18t) :: i, j
integer :: ios, line_length, unit_number

cached_answers = AnswerT(0, '', errort)
do i=1, size(cached_answers)
cached_answers(i)%type = errort
end do

unit_number = prev_unit + 1
Expand Down

0 comments on commit d58adeb

Please sign in to comment.