# HG changeset patch # User jwe # Date 862432708 0 # Node ID ead3d82ea9b1b125f8fe8ffab1ba22dcdadefd50 # Parent 1b31c5bc89449f1e990a331be53afd8f5c751c99 [project @ 1997-04-30 20:38:26 by jwe] diff -r 1b31c5bc8944 -r ead3d82ea9b1 src/op-fil-b.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/op-fil-b.cc Wed Apr 30 20:38:28 1997 +0000 @@ -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 +#endif + +#include + +#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: *** +*/ diff -r 1b31c5bc8944 -r ead3d82ea9b1 src/op-fil-bm.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/op-fil-bm.cc Wed Apr 30 20:38:28 1997 +0000 @@ -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 +#endif + +#include + +#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: *** +*/ diff -r 1b31c5bc8944 -r ead3d82ea9b1 src/op-fil-cm.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/op-fil-cm.cc Wed Apr 30 20:38:28 1997 +0000 @@ -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 +#endif + +#include + +#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: *** +*/ diff -r 1b31c5bc8944 -r ead3d82ea9b1 src/op-fil-cs.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/op-fil-cs.cc Wed Apr 30 20:38:28 1997 +0000 @@ -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 +#endif + +#include + +#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: *** +*/ diff -r 1b31c5bc8944 -r ead3d82ea9b1 src/op-fil-lis.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/op-fil-lis.cc Wed Apr 30 20:38:28 1997 +0000 @@ -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 +#endif + +#include + +#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: *** +*/ diff -r 1b31c5bc8944 -r ead3d82ea9b1 src/op-fil-m.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/op-fil-m.cc Wed Apr 30 20:38:28 1997 +0000 @@ -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 +#endif + +#include + +#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: *** +*/ diff -r 1b31c5bc8944 -r ead3d82ea9b1 src/op-fil-rec.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/op-fil-rec.cc Wed Apr 30 20:38:28 1997 +0000 @@ -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 +#endif + +#include + +#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: *** +*/ diff -r 1b31c5bc8944 -r ead3d82ea9b1 src/op-fil-s.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/op-fil-s.cc Wed Apr 30 20:38:28 1997 +0000 @@ -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 +#endif + +#include + +#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: *** +*/ diff -r 1b31c5bc8944 -r ead3d82ea9b1 src/op-fil-str.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/op-fil-str.cc Wed Apr 30 20:38:28 1997 +0000 @@ -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 +#endif + +#include + +#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: *** +*/