1111#include " cutest_modules.h"
1212
1313#ifdef REAL_32
14- #define LOAD_ROUTINES_NAME "load_routines_s_ "
15- #define UNLOAD_ROUTINES_NAME "unload_routines_s_ "
16- #define SHOW_LOADED_LIBRARY_NAME "show_loaded_library_s_ "
14+ #define LOAD_ROUTINES_NAME "cutest_load_routines_s_ "
15+ #define UNLOAD_ROUTINES_NAME "cutest_unload_routines_s_ "
16+ #define SHOW_LOADED_LIBRARY_NAME "cutest_show_loaded_library_s_ "
1717#define ELFUN_BIND_NAME "elfun_s_"
1818#define GROUP_BIND_NAME "group_s_"
1919#define RANGE_BIND_NAME "range_s_"
2020#elif REAL_128
21- #define LOAD_ROUTINES_NAME "load_routines_q_ "
22- #define UNLOAD_ROUTINES_NAME "unload_routines_q_ "
23- #define SHOW_LOADED_LIBRARY_NAME "show_loaded_library_q_ "
21+ #define LOAD_ROUTINES_NAME "cutest_load_routines_q_ "
22+ #define UNLOAD_ROUTINES_NAME "cutest_unload_routines_q_ "
23+ #define SHOW_LOADED_LIBRARY_NAME "cutest_show_loaded_library_q_ "
2424#define ELFUN_BIND_NAME "elfun_q_"
2525#define GROUP_BIND_NAME "group_q_"
2626#define RANGE_BIND_NAME "range_q_"
2727#else
28- #define LOAD_ROUTINES_NAME "load_routines_ "
29- #define UNLOAD_ROUTINES_NAME "unload_routines_ "
30- #define SHOW_LOADED_LIBRARY_NAME "show_loaded_library_ "
28+ #define LOAD_ROUTINES_NAME "cutest_load_routines_ "
29+ #define UNLOAD_ROUTINES_NAME "cutest_unload_routines_ "
30+ #define SHOW_LOADED_LIBRARY_NAME "cutest_show_loaded_library_ "
3131#define ELFUN_BIND_NAME "elfun_"
3232#define GROUP_BIND_NAME "group_"
3333#define RANGE_BIND_NAME "range_"
@@ -95,7 +95,7 @@ end subroutine cutest_dlclose
9595
9696contains
9797 ! Subroutine to load the routines from the given shared library
98- subroutine load_routines (libname ) bind(C, name= LOAD_ROUTINES_NAME)
98+ subroutine cutest_load_routines (libname ) bind(C, name= LOAD_ROUTINES_NAME)
9999 character (kind= c_char), dimension (* ), intent (in ) :: libname
100100
101101 ! Load the dynamic library
@@ -115,10 +115,10 @@ subroutine load_routines(libname) bind(C, name=LOAD_ROUTINES_NAME)
115115 call c_f_procpointer(ptr_elfun, fun_elfun)
116116 call c_f_procpointer(ptr_group, fun_group)
117117 call c_f_procpointer(ptr_range, fun_range)
118- end subroutine load_routines
118+ end subroutine cutest_load_routines
119119
120120 ! Unload the routines and reset internal state
121- subroutine unload_routines () bind(C, name= UNLOAD_ROUTINES_NAME)
121+ subroutine cutest_unload_routines () bind(C, name= UNLOAD_ROUTINES_NAME)
122122 if (c_associated(lib_handle)) then
123123 call cutest_dlclose(lib_handle)
124124 lib_handle = c_null_ptr
@@ -131,16 +131,16 @@ subroutine unload_routines() bind(C, name=UNLOAD_ROUTINES_NAME)
131131 nullify(fun_elfun)
132132 nullify(fun_group)
133133 nullify(fun_range)
134- end subroutine unload_routines
134+ end subroutine cutest_unload_routines
135135
136136 ! Show the currently loaded library
137- ! subroutine show_loaded_library () bind(C, name=SHOW_LOADED_LIBRARY_NAME)
137+ ! subroutine cutest_show_loaded_library () bind(C, name=SHOW_LOADED_LIBRARY_NAME)
138138 ! if (allocated(library_path)) then
139139 ! print *, "Currently loaded library: ", library_path
140140 ! else
141141 ! print *, "No library loaded."
142142 ! end if
143- ! end subroutine show_loaded_library
143+ ! end subroutine cutest_show_loaded_library
144144
145145 ! Redirection subroutine for calling the 'elfun' function from the dynamic library
146146 subroutine elfun () bind(C, name= ELFUN_BIND_NAME)
0 commit comments