changeset 2913:ead3d82ea9b1

[project @ 1997-04-30 20:38:26 by jwe]
author jwe
date Wed, 30 Apr 1997 20:38:28 +0000
parents 1b31c5bc8944
children d6a3e3723736
files src/op-fil-b.cc src/op-fil-bm.cc src/op-fil-cm.cc src/op-fil-cs.cc src/op-fil-lis.cc src/op-fil-m.cc src/op-fil-rec.cc src/op-fil-s.cc src/op-fil-str.cc
diffstat 9 files changed, 702 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/src/op-fil-b.cc
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 1996, 1997 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#if defined (__GNUG__)
+#pragma implementation
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <iostream.h>
+
+#include "mach-info.h"
+
+#include "error.h"
+#include "oct-stream.h"
+#include "ops.h"
+#include "ov.h"
+#include "ov-file.h"
+#include "ov-bool.h"
+#include "ov-typeinfo.h"
+
+// file by bool ops.
+
+DEFBINOP (lshift, file, bool)
+{
+  CAST_BINOP_ARGS (const octave_file&, const octave_bool&);
+
+  octave_stream *oct_stream = v1.stream_value ();
+
+  if (oct_stream)
+    {
+      ostream *osp = oct_stream->output_stream ();
+
+      if (osp)
+	{
+	  ostream& os = *osp;
+
+	  v2.print_raw (os);
+	}
+      else
+	error ("invalid file specified for binary operator `<<'");
+    }
+
+  return octave_value (oct_stream, v1.stream_number ());
+}
+
+void
+install_fil_b_ops (void)
+{
+  INSTALL_BINOP (lshift, octave_file, octave_bool, lshift);
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
new file mode 100644
--- /dev/null
+++ b/src/op-fil-bm.cc
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 1996, 1997 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#if defined (__GNUG__)
+#pragma implementation
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <iostream.h>
+
+#include "mach-info.h"
+
+#include "error.h"
+#include "oct-stream.h"
+#include "ops.h"
+#include "ov.h"
+#include "ov-file.h"
+#include "ov-bool-mat.h"
+#include "ov-typeinfo.h"
+
+// file by bool matrix ops.
+
+DEFBINOP (lshift, file, bool_matrix)
+{
+  CAST_BINOP_ARGS (const octave_file&, const octave_bool_matrix&);
+
+  octave_stream *oct_stream = v1.stream_value ();
+
+  if (oct_stream)
+    {
+      ostream *osp = oct_stream->output_stream ();
+
+      if (osp)
+	{
+	  ostream& os = *osp;
+
+	  v2.print_raw (os);
+	}
+      else
+	error ("invalid file specified for binary operator `<<'");
+    }
+
+  return octave_value (oct_stream, v1.stream_number ());
+}
+
+void
+install_fil_bm_ops (void)
+{
+  INSTALL_BINOP (lshift, octave_file, octave_bool_matrix, lshift);
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
new file mode 100644
--- /dev/null
+++ b/src/op-fil-cm.cc
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 1996, 1997 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#if defined (__GNUG__)
+#pragma implementation
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <iostream.h>
+
+#include "mach-info.h"
+
+#include "error.h"
+#include "oct-stream.h"
+#include "ops.h"
+#include "ov.h"
+#include "ov-file.h"
+#include "ov-cx-mat.h"
+#include "ov-typeinfo.h"
+
+// file by complex matrix ops.
+
+DEFBINOP (lshift, file, complex_matrix)
+{
+  CAST_BINOP_ARGS (const octave_file&, const octave_complex_matrix&);
+
+  octave_stream *oct_stream = v1.stream_value ();
+
+  if (oct_stream)
+    {
+      ostream *osp = oct_stream->output_stream ();
+
+      if (osp)
+	{
+	  ostream& os = *osp;
+
+	  v2.print_raw (os);
+	}
+      else
+	error ("invalid file specified for binary operator `<<'");
+    }
+
+  return octave_value (oct_stream, v1.stream_number ());
+}
+
+void
+install_fil_cm_ops (void)
+{
+  INSTALL_BINOP (lshift, octave_file, octave_complex_matrix, lshift);
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
new file mode 100644
--- /dev/null
+++ b/src/op-fil-cs.cc
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 1996, 1997 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#if defined (__GNUG__)
+#pragma implementation
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <iostream.h>
+
+#include "mach-info.h"
+
+#include "error.h"
+#include "oct-stream.h"
+#include "ops.h"
+#include "ov.h"
+#include "ov-file.h"
+#include "ov-complex.h"
+#include "ov-typeinfo.h"
+
+// file by complex scalar ops.
+
+DEFBINOP (lshift, file, complex)
+{
+  CAST_BINOP_ARGS (const octave_file&, const octave_complex&);
+
+  octave_stream *oct_stream = v1.stream_value ();
+
+  if (oct_stream)
+    {
+      ostream *osp = oct_stream->output_stream ();
+
+      if (osp)
+	{
+	  ostream& os = *osp;
+
+	  v2.print_raw (os);
+	}
+      else
+	error ("invalid file specified for binary operator `<<'");
+    }
+
+  return octave_value (oct_stream, v1.stream_number ());
+}
+
+void
+install_fil_cs_ops (void)
+{
+  INSTALL_BINOP (lshift, octave_file, octave_complex, lshift);
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
new file mode 100644
--- /dev/null
+++ b/src/op-fil-lis.cc
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 1996, 1997 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#if defined (__GNUG__)
+#pragma implementation
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <iostream.h>
+
+#include "mach-info.h"
+
+#include "error.h"
+#include "oct-stream.h"
+#include "ops.h"
+#include "ov.h"
+#include "ov-file.h"
+#include "ov-list.h"
+#include "ov-typeinfo.h"
+
+// file by list ops.
+
+DEFBINOP (lshift, file, list)
+{
+  CAST_BINOP_ARGS (const octave_file&, const octave_list&);
+
+  octave_stream *oct_stream = v1.stream_value ();
+
+  if (oct_stream)
+    {
+      ostream *osp = oct_stream->output_stream ();
+
+      if (osp)
+	{
+	  ostream& os = *osp;
+
+	  v2.print_raw (os);
+	}
+      else
+	error ("invalid file specified for binary operator `<<'");
+    }
+
+  return octave_value (oct_stream, v1.stream_number ());
+}
+
+void
+install_fil_lis_ops (void)
+{
+  INSTALL_BINOP (lshift, octave_file, octave_list, lshift);
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
new file mode 100644
--- /dev/null
+++ b/src/op-fil-m.cc
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 1996, 1997 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#if defined (__GNUG__)
+#pragma implementation
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <iostream.h>
+
+#include "mach-info.h"
+
+#include "error.h"
+#include "oct-stream.h"
+#include "ops.h"
+#include "ov.h"
+#include "ov-file.h"
+#include "ov-re-mat.h"
+#include "ov-typeinfo.h"
+
+// file by matrix ops.
+
+DEFBINOP (lshift, file, matrix)
+{
+  CAST_BINOP_ARGS (const octave_file&, const octave_matrix&);
+
+  octave_stream *oct_stream = v1.stream_value ();
+
+  if (oct_stream)
+    {
+      ostream *osp = oct_stream->output_stream ();
+
+      if (osp)
+	{
+	  ostream& os = *osp;
+
+	  v2.print_raw (os);
+	}
+      else
+	error ("invalid file specified for binary operator `<<'");
+    }
+
+  return octave_value (oct_stream, v1.stream_number ());
+}
+
+void
+install_fil_m_ops (void)
+{
+  INSTALL_BINOP (lshift, octave_file, octave_matrix, lshift);
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
new file mode 100644
--- /dev/null
+++ b/src/op-fil-rec.cc
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 1996, 1997 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#if defined (__GNUG__)
+#pragma implementation
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <iostream.h>
+
+#include "mach-info.h"
+
+#include "error.h"
+#include "oct-stream.h"
+#include "ops.h"
+#include "ov.h"
+#include "ov-file.h"
+#include "ov-struct.h"
+#include "ov-typeinfo.h"
+
+// file by struct ops.
+
+DEFBINOP (lshift, file, struct)
+{
+  CAST_BINOP_ARGS (const octave_file&, const octave_struct&);
+
+  octave_stream *oct_stream = v1.stream_value ();
+
+  if (oct_stream)
+    {
+      ostream *osp = oct_stream->output_stream ();
+
+      if (osp)
+	{
+	  ostream& os = *osp;
+
+	  v2.print_raw (os);
+	}
+      else
+	error ("invalid file specified for binary operator `<<'");
+    }
+
+  return octave_value (oct_stream, v1.stream_number ());
+}
+
+void
+install_fil_rec_ops (void)
+{
+  INSTALL_BINOP (lshift, octave_file, octave_struct, lshift);
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
new file mode 100644
--- /dev/null
+++ b/src/op-fil-s.cc
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 1996, 1997 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#if defined (__GNUG__)
+#pragma implementation
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <iostream.h>
+
+#include "mach-info.h"
+
+#include "error.h"
+#include "oct-stream.h"
+#include "ops.h"
+#include "ov.h"
+#include "ov-file.h"
+#include "ov-scalar.h"
+#include "ov-typeinfo.h"
+
+// file by scalar ops.
+
+DEFBINOP (lshift, file, scalar)
+{
+  CAST_BINOP_ARGS (const octave_file&, const octave_scalar&);
+
+  octave_stream *oct_stream = v1.stream_value ();
+
+  if (oct_stream)
+    {
+      ostream *osp = oct_stream->output_stream ();
+
+      if (osp)
+	{
+	  ostream& os = *osp;
+
+	  v2.print_raw (os);
+	}
+      else
+	error ("invalid file specified for binary operator `<<'");
+    }
+
+  return octave_value (oct_stream, v1.stream_number ());
+}
+
+void
+install_fil_s_ops (void)
+{
+  INSTALL_BINOP (lshift, octave_file, octave_scalar, lshift);
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/
new file mode 100644
--- /dev/null
+++ b/src/op-fil-str.cc
@@ -0,0 +1,78 @@
+/*
+
+Copyright (C) 1996, 1997 John W. Eaton
+
+This file is part of Octave.
+
+Octave is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+Octave is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with Octave; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
+*/
+
+#if defined (__GNUG__)
+#pragma implementation
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <iostream.h>
+
+#include "mach-info.h"
+
+#include "error.h"
+#include "oct-stream.h"
+#include "ops.h"
+#include "ov.h"
+#include "ov-file.h"
+#include "ov-str-mat.h"
+#include "ov-typeinfo.h"
+
+// file by string ops.
+
+DEFBINOP (lshift, file, char_matrix_str)
+{
+  CAST_BINOP_ARGS (const octave_file&, const octave_char_matrix_str&);
+
+  octave_stream *oct_stream = v1.stream_value ();
+
+  if (oct_stream)
+    {
+      ostream *osp = oct_stream->output_stream ();
+
+      if (osp)
+	{
+	  ostream& os = *osp;
+
+	  v2.print_raw (os);
+	}
+      else
+	error ("invalid file specified for binary operator `<<'");
+    }
+
+  return octave_value (oct_stream, v1.stream_number ());
+}
+
+void
+install_fil_str_ops (void)
+{
+  INSTALL_BINOP (lshift, octave_file, octave_char_matrix_str, lshift);
+}
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; End: ***
+*/