From 0198819adc1851459e094877a5516985db399bb6 Mon Sep 17 00:00:00 2001
From: Evgeny Mortikov <evgeny.mortikov@gmail.com>
Date: Sat, 21 Sep 2024 23:02:13 +0300
Subject: [PATCH] config parser module update

---
 config-parser/config-parser.f90 | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/config-parser/config-parser.f90 b/config-parser/config-parser.f90
index 1ee8aba..8c4874e 100644
--- a/config-parser/config-parser.f90
+++ b/config-parser/config-parser.f90
@@ -1,11 +1,13 @@
 module config_parser
 
+    implicit none
+    public
+
     !< @brief C->Fortran interface 
     interface
         !< process configuration file [filename], status = [0 (ERROR), 1 (OK)]
         subroutine c_config_run(filename, status) BIND(C)
             use, intrinsic :: iso_c_binding, only: C_CHAR, C_INT
-            implicit none
             character (kind=C_CHAR), intent(in) :: filename(*)
             integer (kind=C_INT), intent(out) :: status
         end subroutine c_config_run
@@ -13,7 +15,6 @@ module config_parser
         !< check if variable [name] is defined, status = [0 (FALSE), 1 (TRUE)]
         subroutine c_config_is_varname(name, status) BIND(C)
             use, intrinsic :: iso_c_binding, only: C_CHAR, C_INT
-            implicit none
             character (kind=C_CHAR), intent(in) :: name(*)
             integer (kind=C_INT), intent(out) :: status
         end subroutine c_config_is_varname
@@ -21,7 +22,6 @@ module config_parser
         !< get (int) [value] of variable [name], status = [0 (ERROR), 1 (OK)]
         subroutine c_config_get_int(name, value, status) BIND(C)
             use, intrinsic :: iso_c_binding, only: C_CHAR, C_INT
-            implicit none
             character (kind=C_CHAR), intent(in) :: name(*)
             integer (kind=C_INT), intent(out) :: value
             integer (kind=C_INT), intent(out) :: status
@@ -30,7 +30,6 @@ module config_parser
         !< get (float) [value] of variable [name], status = [0 (ERROR), 1 (OK)]
         subroutine c_config_get_float(name, value, status) BIND(C)
             use, intrinsic :: iso_c_binding, only: C_CHAR, C_INT, C_FLOAT
-            implicit none
             character (kind=C_CHAR), intent(in) :: name(*)
             real (kind=C_FLOAT), intent(out) :: value
             integer (kind=C_INT), intent(out) :: status
@@ -39,7 +38,6 @@ module config_parser
         !< get (double) [value] of variable [name], status = [0 (ERROR), 1 (OK)]
         subroutine c_config_get_double(name, value, status) BIND(C)
             use, intrinsic :: iso_c_binding, only: C_CHAR, C_INT, C_DOUBLE
-            implicit none
             character (kind=C_CHAR), intent(in) :: name(*)
             real (kind=C_DOUBLE), intent(out) :: value
             integer (kind=C_INT), intent(out) :: status
@@ -49,7 +47,6 @@ module config_parser
         !<      [len] = 0 if variable is not defined or not a string
         subroutine c_config_get_string_len(name, len) BIND(C)
             use, intrinsic :: iso_c_binding, only: C_CHAR, C_INT
-            implicit none
             character (kind=C_CHAR), intent(in) :: name(*)
             integer (kind=C_INT), intent(out) :: len
         end subroutine c_config_get_string_len
@@ -59,7 +56,6 @@ module config_parser
         !<       *: [c_str] output doesn't contain the null terminated character
         subroutine c_config_get_string_unsafe(name, c_str, status) BIND(C)
             use, intrinsic :: iso_c_binding, only: C_CHAR, C_INT
-            implicit none
             character (kind=C_CHAR), intent(in) :: name(*)
             character (kind=C_CHAR), intent(out) :: c_str(*)
             integer (kind=C_INT), intent(out) :: status
@@ -77,7 +73,6 @@ module config_parser
     !       *: [c_str] output doesn't contain the null terminated character
     subroutine c_config_get_string(name, c_str, status)
         use, intrinsic :: iso_c_binding, only: C_CHAR, C_INT
-        implicit none
         character (kind=C_CHAR), intent(in) :: name(*)
         character (kind=C_CHAR), allocatable, intent(out) :: c_str(:)
         integer (kind=C_INT), intent(out) :: status
@@ -100,4 +95,4 @@ module config_parser
     ! --------------------------------------------------------------------------------
     ! --------------------------------------------------------------------------------
 
-end module config_parser
\ No newline at end of file
+end module config_parser
-- 
GitLab