1af0996ceSBarry Smith #include <petsc/private/fortranimpl.h> 2665c2dedSJed Brown #include <petscviewer.h> 35c6c1daeSBarry Smith 45c6c1daeSBarry Smith #if defined(PETSC_HAVE_FORTRAN_CAPS) 55c6c1daeSBarry Smith #define petscviewersetformat_ PETSCVIEWERSETFORMAT 65c6c1daeSBarry Smith #define petscviewersettype_ PETSCVIEWERSETTYPE 75c6c1daeSBarry Smith #define petscviewerpushformat_ PETSCVIEWERPUSHFORMAT 85c6c1daeSBarry Smith #define petscviewerpopformat_ PETSCVIEWERPOPFORMAT 95c6c1daeSBarry Smith #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) 105c6c1daeSBarry Smith #define petscviewersetformat_ petscviewersetformat 115c6c1daeSBarry Smith #define petscviewersettype_ petscviewersettype 125c6c1daeSBarry Smith #define petscviewerpushformat_ petscviewerpushformat 135c6c1daeSBarry Smith #define petscviewerpopformat_ petscviewerpopformat 145c6c1daeSBarry Smith #endif 155c6c1daeSBarry Smith 16*6a9046bcSBarry Smith PETSC_EXTERN PetscErrorCode PetscViewerSetFormatDeprecated(PetscViewer,PetscViewerFormat); 17*6a9046bcSBarry Smith 18*6a9046bcSBarry Smith PETSC_EXTERN void PETSC_STDCALL petscviewersetformat_(PetscViewer *vin,PetscViewerFormat *format,PetscErrorCode *ierr) 19*6a9046bcSBarry Smith { 20*6a9046bcSBarry Smith PetscViewer v; 21*6a9046bcSBarry Smith PetscPatchDefaultViewers_Fortran(vin,v); 22*6a9046bcSBarry Smith *ierr = PetscViewerSetFormatDeprecated(v,*format); 23*6a9046bcSBarry Smith } 24*6a9046bcSBarry Smith 258cc058d9SJed Brown PETSC_EXTERN void PETSC_STDCALL petscviewersettype_(PetscViewer *x,CHAR type_name PETSC_MIXED_LEN(len),PetscErrorCode *ierr PETSC_END_LEN(len)) 265c6c1daeSBarry Smith { 275c6c1daeSBarry Smith char *t; 285c6c1daeSBarry Smith 295c6c1daeSBarry Smith FIXCHAR(type_name,len,t); 305c6c1daeSBarry Smith *ierr = PetscViewerSetType(*x,t); 315c6c1daeSBarry Smith FREECHAR(type_name,t); 325c6c1daeSBarry Smith } 335c6c1daeSBarry Smith 34*6a9046bcSBarry Smith 355c6c1daeSBarry Smith 368cc058d9SJed Brown PETSC_EXTERN void PETSC_STDCALL petscviewerpushformat_(PetscViewer *vin,PetscViewerFormat *format,PetscErrorCode *ierr) 375c6c1daeSBarry Smith { 385c6c1daeSBarry Smith PetscViewer v; 395c6c1daeSBarry Smith PetscPatchDefaultViewers_Fortran(vin,v); 405c6c1daeSBarry Smith *ierr = PetscViewerPushFormat(v,*format); 415c6c1daeSBarry Smith } 425c6c1daeSBarry Smith 438cc058d9SJed Brown PETSC_EXTERN void PETSC_STDCALL petscviewerpopformat_(PetscViewer *vin,PetscErrorCode *ierr) 445c6c1daeSBarry Smith { 455c6c1daeSBarry Smith PetscViewer v; 465c6c1daeSBarry Smith PetscPatchDefaultViewers_Fortran(vin,v); 475c6c1daeSBarry Smith *ierr = PetscViewerPopFormat(v); 485c6c1daeSBarry Smith } 49