1 #include "private/fortranimpl.h" 2 #include "petscsys.h" 3 4 #if defined(PETSC_HAVE_FORTRAN_CAPS) 5 #define petscbinaryopen_ PETSCBINARYOPEN 6 #define petsctestfile_ PETSCTESTFILE 7 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) 8 #define petscbinaryopen_ petscbinaryopen 9 #define petsctestfile_ petsctestfile 10 #endif 11 12 EXTERN_C_BEGIN 13 void PETSC_STDCALL petscbinaryopen_(CHAR name PETSC_MIXED_LEN(len),PetscFileMode *type,int *fd, 14 PetscErrorCode *ierr PETSC_END_LEN(len)) 15 { 16 char *c1; 17 18 FIXCHAR(name,len,c1); 19 *ierr = PetscBinaryOpen(c1,*type,fd); 20 FREECHAR(name,c1); 21 } 22 23 void PETSC_STDCALL petsctestfile_(CHAR name PETSC_MIXED_LEN(len),CHAR mode PETSC_MIXED_LEN(len1),PetscTruth *flg,PetscErrorCode *ierr PETSC_END_LEN(len) PETSC_END_LEN(len1)) 24 { 25 char *c1,*m1; 26 27 FIXCHAR(name,len,c1); 28 FIXCHAR(mode,len1,m1); 29 *ierr = PetscTestFile(c1,*m1,flg); 30 FREECHAR(name,c1); 31 FREECHAR(mode,m1); 32 } 33 34 EXTERN_C_END 35