changeset 2085:7603b37325db

[project @ 1996-04-25 05:55:19 by jwe] Initial revision
author jwe
date Thu, 25 Apr 1996 05:55:19 +0000
parents 30c55a47d6ae
children bfb775fb6fe8
files src/bogus.cc
diffstat 1 files changed, 54 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/src/bogus.cc
@@ -0,0 +1,54 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "defun-dld.h"
+#include "error.h"
+#include "f77-fcn.h"
+#include "oct-obj.h"
+#include "procstream.h"
+
+#undef F77_XFCN_ERROR
+#if defined (F77_UPPERCASE_NAMES)
+#define F77_XFCN_ERROR(f, F) \
+  (*current_liboctave_error_handler) \
+    ("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)
+#endif
+
+extern "C"
+{
+  int F77_FCN (dgemv, DGEMV) (const char*, const int&, const int&,
+			      const double&, const double*,
+			      const int&, const double*, const int&,
+			      const double&, double*, const int&,
+			      long);
+}
+
+DEFUN_DLD_BUILTIN (bogus, , ,
+  "bogus (): bogus function")
+{
+  octave_value_list retval;
+
+  double *x;
+  F77_XFCN (dgemv, DGEMV, ("x", 1, 2, 1.0, x, 5, x, 7, 8.0, x, 10, 1L));
+
+  if (error_state)
+    error ("error in bogus");
+
+  iostream *s = new procstream ();
+  s.tellg ();
+  s.seekg (0, ios::beg);
+
+  return retval;
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; page-delimiter: "^/\\*" ***
+;;; End: ***
+*/