1 #include <petsc/private/fortranimpl.h> 2 #include <petscviewer.h> 3 4 #if defined(PETSC_HAVE_FORTRAN_CAPS) 5 #define petsc_viewer_stdout__ PETSC_VIEWER_STDOUT_BROKEN 6 #define petscviewerasciiopen_ PETSCVIEWERASCIIOPEN 7 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) 8 #define petscviewerasciiopen_ petscviewerasciiopen 9 #define petsc_viewer_stdout__ petsc_viewer_stdout_ 10 #endif 11 12 #if defined(PETSC_HAVE_FORTRAN_UNDERSCORE_UNDERSCORE) 13 #define petsc_viewer_stdout__ petsc_viewer_stdout___ 14 #endif 15 16 PETSC_EXTERN void petscviewerasciiopen_(MPI_Comm *comm, char *name, PetscViewer *lab, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len) 17 { 18 char *c1; 19 FIXCHAR(name, len, c1); 20 *ierr = PetscViewerASCIIOpen(MPI_Comm_f2c(*(MPI_Fint *)&*comm), c1, lab); 21 if (*ierr) return; 22 FREECHAR(name, c1); 23 } 24 25 PETSC_EXTERN PetscViewer petsc_viewer_stdout__(MPI_Comm *comm) 26 { 27 return PETSC_VIEWER_STDOUT_(MPI_Comm_f2c(*(MPI_Fint *)&*comm)); 28 } 29