changeset 5930:a703198cb8b8

[project @ 2006-08-15 06:06:15 by jwe]
author jwe
date Tue, 15 Aug 2006 06:06:16 +0000
parents e6c29de3be38
children 25da9a7d5f6d
files scripts/ChangeLog scripts/deprecated/is_global.m src/ChangeLog src/ls-mat5.cc src/variables.cc
diffstat 5 files changed, 40 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2006-08-15  John W. Eaton  <jwe@octave.org>
+
+	* deprecated/is_global.m: Delete.
+
 2006-08-14  John W. Eaton  <jwe@octave.org>
 
 	* pkg/Makefile.in (script_sub_dir): Change from plot to pkg.
deleted file mode 100644
--- a/scripts/deprecated/is_global.m
+++ /dev/null
@@ -1,31 +0,0 @@
-## Copyright (C) 2002 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, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-## 02110-1301, USA.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {} is_global (@var{a})
-## This function has been deprecated.  Use isglobal instead.
-## @end deftypefn
-
-## Author: jwe
-
-function retval = is_global (varargin)
-
-  retval = isglobal (varargin{:});
-
-endfunction
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-15  John W. Eaton  <jwe@octave.org>
+
+	* variables.cc (do_isglobal): New function.
+	(Fisglobal): Use it.
+	(Fis_global): New function.
+
 2006-08-14  John W. Eaton  <jwe@octave.org>
 
 	* variables.cc (symbol_record_name_compare): Fix casts.
--- a/src/ls-mat5.cc
+++ b/src/ls-mat5.cc
@@ -477,7 +477,7 @@
 
   if (type != miMATRIX)
     {
-      error ("load: invalid element type");
+      error ("load: invalid element type = %d", type);
       goto early_read_error;
     }
 
--- a/src/variables.cc
+++ b/src/variables.cc
@@ -706,20 +706,8 @@
   return retval;
 }
 
-DEFUN (isglobal, args, ,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} isglobal (@var{name})\n\
-Return 1 if @var{name} is globally visible.  Otherwise, return 0.  For\n\
-example,\n\
-\n\
-@example\n\
-@group\n\
-global x\n\
-isglobal (\"x\")\n\
-     @result{} 1\n\
-@end group\n\
-@end example\n\
-@end deftypefn")
+static octave_value
+do_isglobal (const octave_value_list& args)
 {
   octave_value retval = false;
 
@@ -746,6 +734,33 @@
   return retval;
 }
 
+DEFUN (isglobal, args, ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} isglobal (@var{name})\n\
+Return 1 if @var{name} is globally visible.  Otherwise, return 0.  For\n\
+example,\n\
+\n\
+@example\n\
+@group\n\
+global x\n\
+isglobal (\"x\")\n\
+     @result{} 1\n\
+@end group\n\
+@end example\n\
+@end deftypefn")
+{
+  return do_isglobal (args);
+}
+
+DEFUN (is_global, args, ,
+  "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} isglobal (@var{name})\n\
+This function has been deprecated.  Use isglobal instead.\n\
+@end deftypefn")
+{
+  return do_isglobal (args);
+}
+
 int
 symbol_exist (const std::string& name, const std::string& type)
 {