Actual source code: zroswf.c

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

  4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
  5:   #define tsroswsettype_ TSROSWSETTYPE
  6:   #define tsroswgettype_ TSROSWGETTYPE
  7: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
  8:   #define tsroswsettype_ tsroswsettype
  9:   #define tsroswgettype_ tsroswgettype
 10: #endif

 12: PETSC_EXTERN void tsroswsettype_(TS *ts, char *type, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len)
 13: {
 14:   char *t;

 16:   FIXCHAR(type, len, t);
 17:   *ierr = TSRosWSetType(*ts, t);
 18:   if (*ierr) return;
 19:   FREECHAR(type, t);
 20: }

 22: PETSC_EXTERN void tsroswgettype_(TS *ts, char *name, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len)
 23: {
 24:   const char *tname;

 26:   *ierr = TSRosWGetType(*ts, &tname);
 27:   *ierr = PetscStrncpy(name, tname, len);
 28:   FIXRETURNCHAR(PETSC_TRUE, name, len);
 29: }