Actual source code: zzoomf.c

      1: #include <petsc/private/ftnimpl.h>
      2: #include <petscdraw.h>

      4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
      5:   #define petscdrawzoom_ PETSCDRAWZOOM
      6: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
      7:   #define petscdrawzoom_ petscdrawzoom
      8: #endif

     10: typedef void (*FCN)(PetscDraw *, void *, PetscErrorCode *); /* force argument to next function to not be extern C*/

     12: static PetscErrorCode ourdrawzoom(PetscDraw draw, void *ctx)
     13: {
     14:   PetscErrorCode ierr = PETSC_SUCCESS;

     16:   (*(void (*)(PetscDraw *, void *, PetscErrorCode *))(((PetscObject)draw)->fortran_func_pointers[0]))(&draw, ctx, &ierr);
     17:   return ierr;
     18: }

     20: PETSC_EXTERN void petscdrawzoom_(PetscDraw *draw, FCN f, void *ctx, PetscErrorCode *ierr)
     21: {
     22:   PetscObjectAllocateFortranPointers(*draw, 1);
     23:   ((PetscObject)*draw)->fortran_func_pointers[0] = (PetscFortranCallbackFn *)f;

     25:   *ierr = PetscDrawZoom(*draw, ourdrawzoom, ctx);
     26: }