changeset 4801:b022780ac0b4

[project @ 2004-02-25 04:40:54 by jwe]
author jwe
date Wed, 25 Feb 2004 04:40:54 +0000
parents c322edde72ac
children b3f20980be32
files libcruft/ChangeLog libcruft/misc/f77-fcn.c libcruft/misc/f77-fcn.h
diffstat 3 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libcruft/ChangeLog	Wed Feb 25 03:54:33 2004 +0000
+++ b/libcruft/ChangeLog	Wed Feb 25 04:40:54 2004 +0000
@@ -1,3 +1,10 @@
+2004-02-24  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* misc/f77-fcn.c: Handle Cray, CVF, and f2c calling conventions.
+
+	* misc/f77-fcn.h (xstopx): Use F77_CHAR_ARG_DECL and
+	F77_CHAR_ARG_LEN_DECL in declaration.
+
 2004-02-20  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* misc/quit.h (OCTAVE_QUIT): Set octave_interrupt_state to -1
--- a/libcruft/misc/f77-fcn.c	Wed Feb 25 03:54:33 2004 +0000
+++ b/libcruft/misc/f77-fcn.c	Wed Feb 25 04:40:54 2004 +0000
@@ -39,8 +39,19 @@
    is necessary.  */
 
 F77_RET_T
-F77_FUNC (xstopx, XSTOPX) (const char *s, long int slen)
+#if defined (F77_USES_CRAY_CALLING_CONVENTION)
+F77_FUNC (xstopx, XSTOPX) (octave_cray_ftn_ch_dsc desc)
+#elif defined (F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION)
+F77_FUNC (xstopx, XSTOPX) (const char *s, int slen)
+#else
+F77_FUNC (xstopx, XSTOPX) (const char *s, long slen)
+#endif
 {
+#if defined (F77_USES_CRAY_CALLING_CONVENTION)
+  const char *s = desc.const_ptr = ptr_arg;
+  unsigned long slen = desc.mask.len;
+#endif
+
   f77_exception_encountered = 1;
 
   /* Skip printing message if it is just a single blank character.  */
--- a/libcruft/misc/f77-fcn.h	Wed Feb 25 03:54:33 2004 +0000
+++ b/libcruft/misc/f77-fcn.h	Wed Feb 25 04:40:54 2004 +0000
@@ -176,7 +176,8 @@
 #endif
 
 extern F77_RET_T
-F77_FUNC (xstopx, XSTOPX) (const char *s, long int slen) GCC_ATTR_NORETURN;
+F77_FUNC (xstopx, XSTOPX) (F77_CONST_CHAR_ARG_DECL
+			   F77_CHAR_ARG_LEN_DECL) GCC_ATTR_NORETURN;
 
 #ifdef __cplusplus
 }