changeset 1852:4ca8c2d4e5f8

[project @ 1996-02-03 14:22:52 by jwe]
author jwe
date Sat, 03 Feb 1996 14:23:24 +0000
parents a032a0a729bd
children a058618316b1
files liboctave/f77-fcn.h
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/f77-fcn.h
+++ b/liboctave/f77-fcn.h
@@ -23,6 +23,10 @@
 #if !defined (octave_f77_fcn_h)
 #define octave_f77_fcn_h 1
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <setjmp.h>
 
 /* Some Fortran compilers append underscores or generate uppercase
@@ -30,9 +34,9 @@
 
 #if defined (F77_APPEND_UNDERSCORE)
 #if defined (F77_UPPERCASE_NAMES)
-#define F77_FCN(f, F) F ## _
+#define F77_FCN(f, F) F##_
 #else
-#define F77_FCN(f, F) f ## _
+#define F77_FCN(f, F) f##_
 #endif
 #else
 #if defined (F77_UPPERCASE_NAMES)
@@ -47,11 +51,11 @@
 #if defined (F77_UPPERCASE_NAMES)
 #define F77_XFCN_ERROR(f, F) \
   (*current_liboctave_error_handler) \
-    ("exception encountered in Fortran subroutine %s", F);
+    ("exception encountered in Fortran subroutine %s", #F)
 #else
 #define F77_XFCN_ERROR(f, F) \
   (*current_liboctave_error_handler) \
-    ("exception encountered in Fortran subroutine %s", f);
+    ("exception encountered in Fortran subroutine %s", #f)
 #endif
 
 /* This can be used to call a Fortran subroutine that might call
@@ -82,6 +86,10 @@
 
 extern void copy_f77_context (void *, void *, unsigned int);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 
 /*