Actual source code: zghomef.c
1: #include <petsc/private/fortranimpl.h>
2: #include <petscsys.h>
4: #if defined(PETSC_HAVE_FORTRAN_CAPS)
5: #define petscfixfilename_ PETSCFIXFILENAME
6: #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
7: #define petscfixfilename_ petscfixfilename
8: #endif
10: /* Definitions of Fortran Wrapper routines */
11: #if defined(__cplusplus)
12: extern "C" {
13: #endif
15: PETSC_EXTERN void petscfixfilename_(char *filein, char *fileout, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len1, PETSC_FORTRAN_CHARLEN_T len2)
16: {
17: PetscCount i, n;
18: char *in, *out;
20: in = filein;
21: out = fileout;
22: n = len1;
24: for (i = 0; i < n; i++) {
25: if (in[i] == PETSC_REPLACE_DIR_SEPARATOR) out[i] = PETSC_DIR_SEPARATOR;
26: else out[i] = in[i];
27: }
28: out[i] = 0;
29: }
31: #if defined(__cplusplus)
32: }
33: #endif