# HG changeset patch # User jwe # Date 862382353 0 # Node ID 057273789b87a2c57e7a66d44bbeb2a5aaae10b1 # Parent 5e7e0cc5e9873756542e40be4d4f1bb3e0d364fe [project @ 1997-04-30 06:34:32 by jwe] diff --git a/src/Makefile.in b/src/Makefile.in --- a/src/Makefile.in +++ b/src/Makefile.in @@ -80,11 +80,7 @@ ov-cx-mat.h ov-ch-mat.h ov-list.h ov-struct.h ov-scalar.h \ ov-range.h ov-complex.h ov-va-args.h ov-colon.h ov-base.h \ ov-str-mat.h ov-bool-mat.h ov-bool.h ov-file.h ov.h \ - ov-typeinfo.h ops.h op-b-b.h op-bm-bm.h op-cm-cm.h \ - op-cm-cs.h op-cm-m.h op-cm-s.h op-cs-cm.h op-cs-cs.h \ - op-cs-m.h op-cs-s.h op-m-cm.h op-m-cs.h op-m-m.h \ - op-m-s.h op-s-cm.h op-s-cs.h op-s-m.h op-s-s.h \ - op-str-str.h oct-sym.h oct-fcn.h oct-builtin.h \ + ov-typeinfo.h ops.h oct-sym.h oct-fcn.h oct-builtin.h \ oct-mapper.h oct-usr-fcn.h TI_SRC := Array-oc.cc Array-os.cc Array-tc.cc Map-fnc.cc Map-tc.cc \ @@ -101,6 +97,11 @@ endif endif +OP_SOURCES := op-b-b.cc op-bm-bm.cc op-cm-cm.cc op-cm-cs.cc \ + op-cm-m.cc op-cm-s.cc op-cs-cm.cc op-cs-cs.cc op-cs-m.cc \ + op-cs-s.cc op-m-cm.cc op-m-cs.cc op-m-m.cc op-m-s.cc \ + op-s-cm.cc op-s-cs.cc op-s-m.cc op-s-s.cc op-str-str.cc + SOURCES := BaseSLList.cc Map.cc SLList.cc SLStack.cc Stack.cc \ data.cc defaults.cc dirfns.cc dynamic-ld.cc error.cc \ file-io.cc fn-cache.cc gripes.cc help.cc input.cc lex.l \ @@ -117,12 +118,8 @@ ov-list.cc ov-re-mat.cc ov-cx-mat.cc ov-range.cc ov-scalar.cc \ ov-complex.cc ov-str-mat.cc ov-struct.cc ov-va-args.cc \ ov-colon.cc ov-bool-mat.cc ov-bool.cc ov-file.cc ov.cc \ - ov-typeinfo.cc ops.cc op-b-b.cc op-bm-bm.cc op-cm-cm.cc \ - op-cm-cs.cc op-cm-m.cc op-cm-s.cc op-cs-cm.cc op-cs-cs.cc \ - op-cs-m.cc op-cs-s.cc op-m-cm.cc op-m-cs.cc op-m-m.cc \ - op-m-s.cc op-s-cm.cc op-s-cs.cc op-s-m.cc op-s-s.cc \ - op-str-str.cc oct-fcn.cc oct-builtin.cc oct-mapper.cc \ - oct-usr-fcn.cc + ov-typeinfo.cc oct-fcn.cc oct-builtin.cc oct-mapper.cc \ + oct-usr-fcn.cc $(OP_SOURCES) OBJECTS_4 := $(SOURCES) OBJECTS_3 := $(patsubst %.l, %.o, $(OBJECTS_4)) @@ -140,7 +137,7 @@ # Ugh. -DEP_4 := $(SOURCES) $(DLD_SRC) $(TI_SRC) builtins.cc octave.cc +DEP_4 := $(SOURCES) $(DLD_SRC) $(TI_SRC) builtins.cc ops.cc octave.cc DEP_3 := $(patsubst %.l, %.cc, $(DEP_4)) DEP_2 := $(patsubst %.y, %.cc, $(DEP_3)) DEP_1 := $(patsubst %.c, %.d, $(DEP_2)) @@ -253,6 +250,11 @@ @$(srcdir)/mkbuiltins def-files var-files > $@.t @$(top_srcdir)/move-if-change $@.t $@ +ops.cc: $(OP_SOURCES) mkops + @echo making $@ from $(OP_SOURCES) + @$(srcdir)/mkops $(OP_SOURCES) > $@.t + @$(top_srcdir)/move-if-change $@.t $@ + $(DEF_FILES): mkdefs defun-int.h defun-dld.h defun.h defaults.h oct-conf.h $(MAKEDEPS): defaults.h oct-gperf.h oct-conf.h diff --git a/src/mappers.cc b/src/mappers.cc --- a/src/mappers.cc +++ b/src/mappers.cc @@ -30,7 +30,6 @@ #include "defun.h" #include "error.h" -#include "mappers.h" #include "oct-mapper.h" // XXX FIXME XXX -- perhaps this could be avoided by determining diff --git a/src/mappers.h b/src/mappers.h deleted file mode 100644 --- a/src/mappers.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - -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 (octave_mappers_h) -#define octave_mappers_h 1 - -extern void install_mapper_functions (void); - -#endif - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ diff --git a/src/mkbuiltins b/src/mkbuiltins --- a/src/mkbuiltins +++ b/src/mkbuiltins @@ -44,8 +44,8 @@ done for file in $VAR_FILES; do - file=`echo $file | sed 's/-/_/g'` - echo "extern void symbols_of_${file} (void);" + f=`echo $file | sed 's/-/_/g'` + echo "extern void symbols_of_${f} (void);" done cat << \EOF @@ -56,8 +56,8 @@ EOF for file in $VAR_FILES; do - file=`echo $file | sed 's/-/_/g'` - echo " symbols_of_${file} ();" + f=`echo $file | sed 's/-/_/g'` + echo " symbols_of_${f} ();" done cat << \EOF diff --git a/src/mkops b/src/mkops new file mode 100755 --- /dev/null +++ b/src/mkops @@ -0,0 +1,37 @@ +#!/bin/sh + +cat << \EOF +// DO NOT EDIT! Generated automatically by mkbuiltins. + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +extern void install_base_type_conversions (void); + +EOF + +for file in "$@"; do + f=`echo $file | sed 's/^op-//; s/\.cc//; s/-/_/g'` + echo "extern void install_${f}_ops (void);" +done + +cat << \EOF + +void +install_ops (void) +{ + install_base_type_conversions (); + +EOF + +for file in "$@"; do + f=`echo $file | sed 's/^op-//; s/\.cc//; s/-/_/g'` + echo " install_${f}_ops ();" +done + +cat << \EOF +} +EOF + +exit 0 diff --git a/src/ov-base.h b/src/ov-base.h --- a/src/ov-base.h +++ b/src/ov-base.h @@ -206,8 +206,6 @@ #endif -extern void install_base_type_conversions (void); - /* ;;; Local Variables: *** ;;; mode: C++ *** diff --git a/src/ov-re-mat.cc b/src/ov-re-mat.cc --- a/src/ov-re-mat.cc +++ b/src/ov-re-mat.cc @@ -35,7 +35,6 @@ #include "mx-base.h" #include "gripes.h" -#include "mappers.h" #include "oct-obj.h" #include "ops.h" #include "ov-scalar.h" diff --git a/src/ov.cc b/src/ov.cc --- a/src/ov.cc +++ b/src/ov.cc @@ -1004,7 +1004,7 @@ } void -symbols_of_value (void) +symbols_of_ov (void) { DEFVAR (do_fortran_indexing, 0.0, 0, do_fortran_indexing, "allow single indices for matrices"); diff --git a/src/ov.h b/src/ov.h --- a/src/ov.h +++ b/src/ov.h @@ -542,8 +542,6 @@ extern void increment_list_indent (void); extern void decrement_list_indent (void); -extern void symbols_of_value (void); - extern void install_types (void); #endif diff --git a/src/svd.cc b/src/svd.cc --- a/src/svd.cc +++ b/src/svd.cc @@ -31,7 +31,6 @@ #include "error.h" #include "gripes.h" #include "help.h" -#include "mappers.h" #include "oct-obj.h" #include "pr-output.h" #include "utils.h" diff --git a/src/utils.cc b/src/utils.cc --- a/src/utils.cc +++ b/src/utils.cc @@ -69,7 +69,6 @@ #include "gripes.h" #include "help.h" #include "input.h" -#include "mappers.h" #include "oct-hist.h" #include "oct-obj.h" #include "pager.h" diff --git a/src/variables.cc b/src/variables.cc --- a/src/variables.cc +++ b/src/variables.cc @@ -51,7 +51,6 @@ #include "str-vec.h" #include -#include "data.h" #include "defun.h" #include "dirfns.h" #include "dynamic-ld.h" @@ -63,7 +62,6 @@ #include "input.h" #include "lex.h" #include "load-save.h" -#include "mappers.h" #include "oct-hist.h" #include "toplev.h" #include "pager.h" @@ -77,11 +75,7 @@ #include "oct-obj.h" #include "pt-id.h" #include "pt-indir.h" -#include "pt-mat.h" -#include "pt-misc.h" -#include "pt-plot.h" #include "pr-output.h" -#include "syscalls.h" #include "toplev.h" #include "unwind-prot.h" #include "utils.h" @@ -1649,7 +1643,7 @@ // XXX FIXME XXX -- there still may be better places for some of these // to be defined. -static void +void symbols_of_variables (void) { DEFVAR (ans, , 0, 0,