# This script generates a fortran source file that uses the ISO_C_BINDINGS to interface to the functions defined in the given C header file.
# The basic approach is, that every C function is wrapped in a fortran function/subroutine, which internally uses a bind(c) interface to the C code.
...
...
@@ -934,10 +935,39 @@ end
#Scan the given header and collect the interface information in the global variables.
defscanHeader(headerPath)
#Scan the given header.
headerLines=IO.popen('cpp -fpreprocessed -dD '+headerPath).readlines#The options cause the preprocessor to strip all comments, but retain all #defines, and ignore #includes.