Actual source code: f90_common.c
2: #include "petscf90.h"
4: #if defined PETSC_HAVE_F90_C
5: #include PETSC_HAVE_F90_C
7: /* Check if PETSC_HAVE_F90_H is also specified */
8: #if !defined(PETSC_HAVE_F90_H)
9: #error "Both PETSC_HAVE_F90_H and PETSC_HAVE_F90_C flags have to be specified in petscconf.h"
10: #endif
12: /* Nag uses char * instead of void* ??? */
14: #define Pointer void*
15: #endif
16: /*-------------------------------------------------------------*/
19: PetscErrorCode F90Array1dAccess(F90Array1d *ptr,void **array)
20: {
24: *array = ptr->addr;
25: return(0);
26: }
30: PetscErrorCode F90Array1dDestroy(F90Array1d *ptr)
31: {
34: ptr->addr = (Pointer)0;
35: return(0);
36: }
39: PetscErrorCode F90Array1dGetNextRecord(F90Array1d *ptr,void **next)
40: {
44: *next = (void*)(ptr + 1);
45: return(0);
46: }
48: /*-------------------------------------------------------------*/
52: PetscErrorCode F90Array2dAccess(F90Array2d *ptr,void **array)
53: {
57: *array = ptr->addr;
58: return(0);
59: }
63: PetscErrorCode F90Array2dDestroy(F90Array2d *ptr)
64: {
67: ptr->addr = (Pointer)0;
68: return(0);
69: }
72: PetscErrorCode F90Array2dGetNextRecord(F90Array2d *ptr,void **next)
73: {
77: *next = (void*)(ptr + 1);
78: return(0);
79: }
80: /*-------------------------------------------------------------*/
82: #endif