Actual source code: f90_common.c

      1: #define PETSC_DLL

      3: #include "petscf90.h"

      5: #if defined PETSC_HAVE_F90_C
      6: #include PETSC_HAVE_F90_C

      8: /* Check if PETSC_HAVE_F90_H is also specified */
      9: #if !defined(PETSC_HAVE_F90_H)
     10: #error "Both PETSC_HAVE_F90_H and PETSC_HAVE_F90_C flags have to be specified in petscconf.h"
     11: #endif

     13: /* Nag uses char * instead of void* ??? */
     15: #define Pointer void*
     16: #endif
     17: /*-------------------------------------------------------------*/
     20: PetscErrorCode PETSC_DLLEXPORT F90Array1dAccess(F90Array1d *ptr,void **array)
     21: {
     25:   *array = ptr->addr;
     26:   return(0);
     27: }

     31: PetscErrorCode PETSC_DLLEXPORT F90Array1dDestroy(F90Array1d *ptr)
     32: {
     35:   ptr->addr = (Pointer)0;
     36:   return(0);
     37: }
     40: PetscErrorCode PETSC_DLLEXPORT F90Array1dGetNextRecord(F90Array1d *ptr,void **next)
     41: {
     45:   *next = (void*)(ptr + 1);
     46:   return(0);
     47: }

     49: /*-------------------------------------------------------------*/

     53: PetscErrorCode PETSC_DLLEXPORT F90Array2dAccess(F90Array2d *ptr,void **array)
     54: {
     58:   *array = ptr->addr;
     59:   return(0);
     60: }

     64: PetscErrorCode PETSC_DLLEXPORT F90Array2dDestroy(F90Array2d *ptr)
     65: {
     68:   ptr->addr = (Pointer)0;
     69:   return(0);
     70: }
     73: PetscErrorCode PETSC_DLLEXPORT F90Array2dGetNextRecord(F90Array2d *ptr,void **next)
     74: {
     78:   *next = (void*)(ptr + 1);
     79:   return(0);
     80: }
     81: /*-------------------------------------------------------------*/

     83: #endif