Actual source code: zfhostf.c

  1: #include <petsc/private/fortranimpl.h>

  3: #if defined(PETSC_HAVE_FORTRAN_CAPS)
  4:   #define petscgethostname_ PETSCGETHOSTNAME
  5: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
  6:   #define petscgethostname_ petscgethostname
  7: #endif

  9: PETSC_EXTERN void petscgethostname_(char *str, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len)
 10: {
 11:   char  *tstr;
 12:   size_t tlen;
 13:   tstr  = str;
 14:   tlen  = len; /* int to size_t */
 15:   *ierr = PetscGetHostName(tstr, tlen);
 16:   FIXRETURNCHAR(PETSC_TRUE, str, len);
 17: }