1*5c6c1daeSBarry Smith #include <petsc-private/fortranimpl.h> 2*5c6c1daeSBarry Smith 3*5c6c1daeSBarry Smith #if defined(PETSC_HAVE_FORTRAN_CAPS) 4*5c6c1daeSBarry Smith #define petscviewersetformat_ PETSCVIEWERSETFORMAT 5*5c6c1daeSBarry Smith #define petscviewersettype_ PETSCVIEWERSETTYPE 6*5c6c1daeSBarry Smith #define petscviewerpushformat_ PETSCVIEWERPUSHFORMAT 7*5c6c1daeSBarry Smith #define petscviewerpopformat_ PETSCVIEWERPOPFORMAT 8*5c6c1daeSBarry Smith #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) 9*5c6c1daeSBarry Smith #define petscviewersetformat_ petscviewersetformat 10*5c6c1daeSBarry Smith #define petscviewersettype_ petscviewersettype 11*5c6c1daeSBarry Smith #define petscviewerpushformat_ petscviewerpushformat 12*5c6c1daeSBarry Smith #define petscviewerpopformat_ petscviewerpopformat 13*5c6c1daeSBarry Smith #endif 14*5c6c1daeSBarry Smith 15*5c6c1daeSBarry Smith EXTERN_C_BEGIN 16*5c6c1daeSBarry Smith 17*5c6c1daeSBarry Smith void PETSC_STDCALL petscviewersettype_(PetscViewer *x,CHAR type_name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len)) 18*5c6c1daeSBarry Smith { 19*5c6c1daeSBarry Smith char *t; 20*5c6c1daeSBarry Smith 21*5c6c1daeSBarry Smith FIXCHAR(type_name,len,t); 22*5c6c1daeSBarry Smith *ierr = PetscViewerSetType(*x,t); 23*5c6c1daeSBarry Smith FREECHAR(type_name,t); 24*5c6c1daeSBarry Smith } 25*5c6c1daeSBarry Smith 26*5c6c1daeSBarry Smith void PETSC_STDCALL petscviewersetformat_(PetscViewer *vin,PetscViewerFormat *format,PetscErrorCode *ierr) 27*5c6c1daeSBarry Smith { 28*5c6c1daeSBarry Smith PetscViewer v; 29*5c6c1daeSBarry Smith PetscPatchDefaultViewers_Fortran(vin,v); 30*5c6c1daeSBarry Smith *ierr = PetscViewerSetFormat(v,*format); 31*5c6c1daeSBarry Smith } 32*5c6c1daeSBarry Smith 33*5c6c1daeSBarry Smith void PETSC_STDCALL petscviewerpushformat_(PetscViewer *vin,PetscViewerFormat *format,PetscErrorCode *ierr) 34*5c6c1daeSBarry Smith { 35*5c6c1daeSBarry Smith PetscViewer v; 36*5c6c1daeSBarry Smith PetscPatchDefaultViewers_Fortran(vin,v); 37*5c6c1daeSBarry Smith *ierr = PetscViewerPushFormat(v,*format); 38*5c6c1daeSBarry Smith } 39*5c6c1daeSBarry Smith 40*5c6c1daeSBarry Smith void PETSC_STDCALL petscviewerpopformat_(PetscViewer *vin,PetscErrorCode *ierr) 41*5c6c1daeSBarry Smith { 42*5c6c1daeSBarry Smith PetscViewer v; 43*5c6c1daeSBarry Smith PetscPatchDefaultViewers_Fortran(vin,v); 44*5c6c1daeSBarry Smith *ierr = PetscViewerPopFormat(v); 45*5c6c1daeSBarry Smith } 46*5c6c1daeSBarry Smith 47*5c6c1daeSBarry Smith EXTERN_C_END 48