# HG changeset patch # User jwe # Date 830411719 0 # Node ID 7603b37325dbfa6d0097d7b91a6c6ba5b20a7e35 # Parent 30c55a47d6aeeb418d95d59ad919550be6775cf0 [project @ 1996-04-25 05:55:19 by jwe] Initial revision diff --git a/src/bogus.cc b/src/bogus.cc new file mode 100644 --- /dev/null +++ b/src/bogus.cc @@ -0,0 +1,54 @@ +#ifdef HAVE_CONFIG_H +#include +#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: *** +*/