Actual source code: f90_common.c

  1: #define PETSC_DLL

  3: #include "src/sys/f90/f90impl.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  F90Array1dAccess(F90Array1d *ptr,void **array)
 21: {
 25:   *array = ptr->addr;
 26:   return(0);
 27: }

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

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

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

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

 85: PetscErrorCode  F90Array3dAccess(F90Array3d *ptr,void **array)
 86: {
 90:   *array = ptr->addr;
 91:   return(0);
 92: }

 96: PetscErrorCode  F90Array3dDestroy(F90Array3d *ptr)
 97: {
100:   ptr->addr = (Pointer)0;
101:   return(0);
102: }
105: PetscErrorCode  F90Array3dGetNextRecord(F90Array3d *ptr,void **next)
106: {
110:   *next = (void*)(ptr + 1);
111:   return(0);
112: }
113: /*-------------------------------------------------------------*/

117: PetscErrorCode  F90Array4dAccess(F90Array4d *ptr,void **array)
118: {
122:   *array = ptr->addr;
123:   return(0);
124: }

128: PetscErrorCode  F90Array4dDestroy(F90Array4d *ptr)
129: {
132:   ptr->addr = (Pointer)0;
133:   return(0);
134: }
137: PetscErrorCode  F90Array4dGetNextRecord(F90Array4d *ptr,void **next)
138: {
142:   *next = (void*)(ptr + 1);
143:   return(0);
144: }
145: /*-------------------------------------------------------------*/
146: #endif