!     Module generated by fmodpy for fortran file named 'PROCEDURE'     
!=====================================================================
MODULE PROCEDURE_WRAPPER
  ! Any necessary "USE" statements
  
  ! Make sure it is clear that no implicit types are used in this wrapper
  IMPLICIT NONE
  ! Any interfaces defined for "PROCEDURE" declarations
  
    
  ABSTRACT INTERFACE
     ! Fortran interface for declaring necessary "PROCEDURE" typed arguments
     SUBROUTINE QUADRATIC_INTERFACE( X, Y ) BIND(C)
    
       REAL, INTENT(IN) :: X
       REAL, INTENT(OUT) :: Y
     END SUBROUTINE QUADRATIC_INTERFACE
  END INTERFACE
    
    
    
  INTERFACE
     ! Fortran interface for passing assumed shapes to non-moduled functions.
     SUBROUTINE TEST_STANDARD( QUADRATIC, STEPS, SOLUTION, MAX_WINDOW &
          &)
       
       PROCEDURE(QUADRATIC_INTERFACE) :: QUADRATIC
       INTEGER, INTENT(IN) :: STEPS
       REAL, INTENT(INOUT) :: SOLUTION
       REAL, INTENT(IN), OPTIONAL :: MAX_WINDOW
     END SUBROUTINE TEST_STANDARD
  END INTERFACE
    
    

CONTAINS
  !     Fortran wrapper for TEST_STANDARD, callable from C     
  !========================================================

   SUBROUTINE c_TEST_STANDARD( QUADRATIC, STEPS, SOLUTION, MAX_WINDOW,&
     & MAX_WINDOW_PRESENT ) BIND(c)
    ! This subroutine's only purpose is to call the source fortran
    !  code while also being accessible from C.
    PROCEDURE(QUADRATIC_INTERFACE) :: QUADRATIC
    INTEGER, INTENT(IN) :: STEPS
    REAL, INTENT(INOUT) :: SOLUTION
    LOGICAL, INTENT(IN) :: MAX_WINDOW_PRESENT
    REAL, INTENT(IN), OPTIONAL :: MAX_WINDOW
    ! Preparation code before function call (copying character arrays)
    
    ! Calling source fortran function
    IF (MAX_WINDOW_PRESENT) THEN
       CALL TEST_STANDARD(QUADRATIC, STEPS, SOLUTION, MAX_WINDOW=MAX_W&
            &INDOW)
    ELSE
       CALL TEST_STANDARD(QUADRATIC, STEPS, SOLUTION)
    ENDIF
    ! Copying out any necessary values for return (character arrays)
    
  END SUBROUTINE c_TEST_STANDARD

END MODULE PROCEDURE_WRAPPER
