src/cobyla.c
/* CALCFC_WRAPPER is a wrapper function, it assumes a CALCFC subroutine written
   in FORTRAN. */
CALCFC_WRAPPER is a wrapper function, it assumes a CALCFC subroutine written
in FORTRAN.
CALCFC_WRAPPER is a wrapper function it assumes a CALCFC subroutine written in FORTRAN .
static REAL
calcfc_wrapper(INTEGER n, INTEGER m, const REAL x[], REAL con[], void* data)
{
# define fc FORTRAN_NAME(calcfc,CALCFC)
  REAL f;
  extern void fc(INTEGER* n, INTEGER* m, const REAL x[], REAL* f, REAL con[]);
  fc(&n, &m, x, &f, con);
  return f;
# undef fc
}
static REAL calcfc_wrapper ( INTEGER n , INTEGER m , const REAL x [ ] , REAL con [ ] , void * data ) { # define fc  FORTRAN_NAME(calcfc,CALCFC) REAL f ; extern void fc ( INTEGER * n , INTEGER * m , const REAL x [ ] , REAL * f , REAL con [ ] ) ; fc ( & n , & m , x , & f , con ) ; return f ; # undef  fc }
CALCFC_WRAPPER is a wrapper function, it assumes a CALCFC subroutine written
in FORTRAN.
CALCFC_WRAPPER is a wrapper function it assumes a CALCFC subroutine written in FORTRAN .