From a07489cd64f4c9809769411f6c0b81ab86c8b564 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 13 May 2004 01:49:04 +0000 Subject: [PATCH] *** empty log message *** --- fortran/README | 2 ++ fortran/gl2ps_f77.c | 9 +++++++++ fortran/main.f | 7 +++++++ 3 files changed, 18 insertions(+) create mode 100644 fortran/README create mode 100644 fortran/gl2ps_f77.c create mode 100644 fortran/main.f diff --git a/fortran/README b/fortran/README new file mode 100644 index 0000000..502a140 --- /dev/null +++ b/fortran/README @@ -0,0 +1,2 @@ +gcc gl2ps_f77.c -c +g77 main.f gl2ps_f77.o diff --git a/fortran/gl2ps_f77.c b/fortran/gl2ps_f77.c new file mode 100644 index 0000000..7af117d --- /dev/null +++ b/fortran/gl2ps_f77.c @@ -0,0 +1,9 @@ +#include <stdlib.h> +#include <stdio.h> + +double gl2psbp_(double *x){ + /* + call the real gl2psBeginPage(); + */ + return *x * 2; +} diff --git a/fortran/main.f b/fortran/main.f new file mode 100644 index 0000000..45241c2 --- /dev/null +++ b/fortran/main.f @@ -0,0 +1,7 @@ + program example + external gl2psbp + real*8 x, y + x = 1.23 + y = gl2psbp(x) + print *, x, y + end -- GitLab