[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pkg-octave-devel] Octave's NEWS file



* Thomas Weber <thomas.weber.mail@gmail.com> [2008-05-03 09:13]:

> On 02/05/08 16:36 -0400, John W. Eaton wrote:
> > On  2-May-2008, Thomas Weber wrote:
> > 
> > | I just discovered that we have Octave's NEWS file under
> > | /usr/share/octave/3.0.1/ and under /usr/share/doc/octave3.0. 
> > | >From the changelog:
> > | 2007-01-24  John W. Eaton  <jwe@octave.org>
> > | 	* octMakefile.in (install): Install NEWS file.
> > | 	(uninstall): Remove it.
> > | 
> > | Should we keep the file there?
> > 
> > For the "news" function to work, the NEWS file must be installed in
> > 
> >   $datadir/octave/$version/NEWS
> 
> Ah, that explains.
> 
> Anyway, patch attached for the deprecated warning.

The changeset attached below fixes the remaining isstr problems.  I hope it
is thorough.

-- 
Rafael
# HG changeset patch
# User Rafael Laboissiere <rafael@debian.org>
# Date 1209808074 -7200
# Node ID 09d7e27e01a51cdc5153350192c32c195dd62330
# Parent  cb9c3570d66fd4c76e148b3d5dfc25399e93f5de
Use isschar instead of deprecated isstr

diff -r cb9c3570d66f -r 09d7e27e01a5 doc/ChangeLog
--- a/doc/ChangeLog	Sat May 03 10:47:56 2008 +0200
+++ b/doc/ChangeLog	Sat May 03 11:47:54 2008 +0200
@@ -1,3 +1,8 @@ 2008-04-02  David Bateman  <dbateman@fre
+2008-05-03  Rafael Laboissiere <rafael@debian.org>
+
+	* interpreter/expr.txi, interpreter/tips.txi: Use ischar instead of
+	deprecated isstr.
+
 2008-04-02  David Bateman  <dbateman@free.fr>
 
 	* interpreter/sparse.txi: Document spaugment.
diff -r cb9c3570d66f -r 09d7e27e01a5 doc/interpreter/expr.txi
--- a/doc/interpreter/expr.txi	Sat May 03 10:47:56 2008 +0200
+++ b/doc/interpreter/expr.txi	Sat May 03 11:47:54 2008 +0200
@@ -747,7 +747,7 @@ is possible write
 @example
 @group
 function f (a, b, c)
-  if (nargin > 2 && isstr (c))
+  if (nargin > 2 && ischar (c))
     @dots{}
 @end group
 @end example
@@ -761,7 +761,7 @@ short-circuit feature, it would be neces
 @group
 function f (a, b, c)
   if (nargin > 2)
-    if (isstr (c))
+    if (ischar (c))
       @dots{}
 @end group
 @end example
@@ -772,7 +772,7 @@ Writing
 @example
 @group
 function f (a, b, c)
-  if (nargin > 2 & isstr (c))
+  if (nargin > 2 & ischar (c))
     @dots{}
 @end group
 @end example
diff -r cb9c3570d66f -r 09d7e27e01a5 doc/interpreter/tips.txi
--- a/doc/interpreter/tips.txi	Sat May 03 10:47:56 2008 +0200
+++ b/doc/interpreter/tips.txi	Sat May 03 11:47:54 2008 +0200
@@ -210,7 +210,7 @@ Here is an example:
 ##  [in, out, pid] = popen2 ("sort", "-nr");
 ##  fputs (in, "these\nare\nsome\nstrings\n");
 ##  fclose (in);
-##  while (isstr (s = fgets (out)))
+##  while (ischar (s = fgets (out)))
 ##    fputs (stdout, s);
 ##  endwhile
 ##  fclose (out);
diff -r cb9c3570d66f -r 09d7e27e01a5 scripts/ChangeLog
--- a/scripts/ChangeLog	Sat May 03 10:47:56 2008 +0200
+++ b/scripts/ChangeLog	Sat May 03 11:47:54 2008 +0200
@@ -1,3 +1,10 @@ 2008-05-01  David Bateman  <dbateman@fre
+2008-05-03  Rafael Laboissiere <rafael@debian.org>
+
+	* linear-algebra/cond.m, miscellaneous/version.m,
+	miscellaneous/version.m, plot/feather.m, plot/__bar__.m,
+	plot/compass.m, plot/__quiver__.m, plot/__scatter__.m: Use ischar
+	instead of deprecated isstr.
+
 2008-05-01  David Bateman  <dbateman@free.fr>
 
 	* plot/plot.m: Remove documentation of 'L' option.
diff -r cb9c3570d66f -r 09d7e27e01a5 scripts/linear-algebra/cond.m
--- a/scripts/linear-algebra/cond.m	Sat May 03 10:47:56 2008 +0200
+++ b/scripts/linear-algebra/cond.m	Sat May 03 11:47:54 2008 +0200
@@ -40,7 +40,7 @@ function retval = cond (a, p)
       p = 2;
     endif
 
-    if (! isstr (p) && p == 2)
+    if (! ischar (p) && p == 2)
       [nr, nc] = size (a);
       if (nr == 0 || nc == 0)
         retval = 0.0;
diff -r cb9c3570d66f -r 09d7e27e01a5 scripts/miscellaneous/computer.m
--- a/scripts/miscellaneous/computer.m	Sat May 03 10:47:56 2008 +0200
+++ b/scripts/miscellaneous/computer.m	Sat May 03 11:47:54 2008 +0200
@@ -73,7 +73,7 @@ function [c, maxsize, endian] = computer
 
 endfunction
 
-%!assert((isstr (computer ())
+%!assert((ischar (computer ())
 %! && computer () == octave_config_info ("canonical_host_type")));
 
 %!warning a =computer(2);
diff -r cb9c3570d66f -r 09d7e27e01a5 scripts/miscellaneous/version.m
--- a/scripts/miscellaneous/version.m	Sat May 03 10:47:56 2008 +0200
+++ b/scripts/miscellaneous/version.m	Sat May 03 11:47:54 2008 +0200
@@ -34,7 +34,7 @@ function vs = version ()
 
 endfunction
 
-%!assert(isstr (version ()) && strcmp (version (), OCTAVE_VERSION));
+%!assert(ischar (version ()) && strcmp (version (), OCTAVE_VERSION));
 
 %!warning version (1);
 
diff -r cb9c3570d66f -r 09d7e27e01a5 scripts/plot/__bar__.m
--- a/scripts/plot/__bar__.m	Sat May 03 10:47:56 2008 +0200
+++ b/scripts/plot/__bar__.m	Sat May 03 11:47:54 2008 +0200
@@ -67,14 +67,14 @@ function varargout = __bar__ (vertical, 
   newargs = {};
   have_line_spec = false;
   while (idx <= nargin - 2)
-    if (isstr (varargin{idx}) && strcmp (varargin{idx}, "grouped"))
+    if (ischar (varargin{idx}) && strcmp (varargin{idx}, "grouped"))
       group = true;
       idx++;
-    elseif (isstr (varargin{idx}) && strcmp (varargin{idx}, "stacked"))
+    elseif (ischar (varargin{idx}) && strcmp (varargin{idx}, "stacked"))
       group = false;
       idx++;
     else
-      if ((isstr (varargin{idx}) || iscell (varargin{idx}))
+      if ((ischar (varargin{idx}) || iscell (varargin{idx}))
 	  && ! have_line_spec)
 	[linespec, valid] = __pltopt__ (func, varargin{idx}, false);
 	if (valid)
@@ -88,7 +88,7 @@ function varargout = __bar__ (vertical, 
 	width = varargin{idx++};
       elseif (idx == nargin - 2)
 	newargs = [newargs,varargin(idx++)];
-      elseif (isstr (varargin{idx}) && strcmp (tolower (varargin{idx}), "basevalue") &&
+      elseif (ischar (varargin{idx}) && strcmp (tolower (varargin{idx}), "basevalue") &&
           isscalar (varargin{idx+1}))
         bv = varargin{idx+1};
         idx += 2;
diff -r cb9c3570d66f -r 09d7e27e01a5 scripts/plot/__quiver__.m
--- a/scripts/plot/__quiver__.m	Sat May 03 10:47:56 2008 +0200
+++ b/scripts/plot/__quiver__.m	Sat May 03 11:47:54 2008 +0200
@@ -79,7 +79,7 @@ function hlist = __quiver__ (varargin)
     arg = varargin{ioff++};
     if (ischar (arg) && strncmp (tolower (arg), "filled", 6))
       have_filled = true;
-    elseif ((isstr (arg) || iscell (arg))
+    elseif ((ischar (arg) || iscell (arg))
 	    && ! have_line_spec)
       [linespec, valid] = __pltopt__ ("quiver", arg, false);
       if (valid)
diff -r cb9c3570d66f -r 09d7e27e01a5 scripts/plot/__scatter__.m
--- a/scripts/plot/__scatter__.m	Sat May 03 10:47:56 2008 +0200
+++ b/scripts/plot/__scatter__.m	Sat May 03 11:47:54 2008 +0200
@@ -79,7 +79,7 @@ function h = __scatter__ (varargin)
     arg = varargin{iarg++};
     if (ischar (arg) && strncmp (tolower (arg), "filled", 6))
       filled = true;
-    elseif ((isstr (arg) || iscell (arg)) && ! have_marker)
+    elseif ((ischar (arg) || iscell (arg)) && ! have_marker)
       [linespec, valid] = __pltopt__ ("scatter", arg, false);
       if (valid)
 	have_marker = true;
diff -r cb9c3570d66f -r 09d7e27e01a5 scripts/plot/compass.m
--- a/scripts/plot/compass.m	Sat May 03 10:47:56 2008 +0200
+++ b/scripts/plot/compass.m	Sat May 03 11:47:54 2008 +0200
@@ -71,7 +71,7 @@ function retval = compass (varargin)
   line_spec = "b-";
   while (ioff <= nargin)
     arg = varargin{ioff++};
-    if ((isstr (arg) || iscell (arg)) && ! have_line_spec)
+    if ((ischar (arg) || iscell (arg)) && ! have_line_spec)
       [linespec, valid] = __pltopt__ ("compass", arg, false);
       if (valid)
 	line_spec = arg;
diff -r cb9c3570d66f -r 09d7e27e01a5 scripts/plot/feather.m
--- a/scripts/plot/feather.m	Sat May 03 10:47:56 2008 +0200
+++ b/scripts/plot/feather.m	Sat May 03 11:47:54 2008 +0200
@@ -71,7 +71,7 @@ function retval = feather (varargin)
   line_spec = "b-";
   while (ioff <= nargin)
     arg = varargin{ioff++};
-    if ((isstr (arg) || iscell (arg)) && ! have_line_spec)
+    if ((ischar (arg) || iscell (arg)) && ! have_line_spec)
       [linespec, valid] = __pltopt__ ("feather", arg, false);
       if (valid)
 	line_spec = arg;
diff -r cb9c3570d66f -r 09d7e27e01a5 src/ChangeLog
--- a/src/ChangeLog	Sat May 03 10:47:56 2008 +0200
+++ b/src/ChangeLog	Sat May 03 11:47:54 2008 +0200
@@ -1,3 +1,8 @@ 2008-04-30  John W. Eaton  <jwe@octave.o
+2008-05-03  Rafael Laboissiere <rafael@debian.org>
+
+	* DLD-FUNCTIONS/time.cc, file_io.cc: Use ischar instead of
+	deprecated isstr.
+
 2008-04-30  John W. Eaton  <jwe@octave.org>
 
 	* dynamic-ld.cc (octave_dynamic_loader::do_load_oct):
diff -r cb9c3570d66f -r 09d7e27e01a5 src/DLD-FUNCTIONS/time.cc
--- a/src/DLD-FUNCTIONS/time.cc	Sat May 03 10:47:56 2008 +0200
+++ b/src/DLD-FUNCTIONS/time.cc	Sat May 03 11:47:54 2008 +0200
@@ -467,11 +467,11 @@ Year (1970-).\n\
 
 /*
 
-%!assert((isstr (strftime ("%%%n%t%H%I%k%l", localtime (time ())))
-%! && isstr (strftime ("%M%p%r%R%s%S%T", localtime (time ())))
-%! && isstr (strftime ("%X%Z%z%a%A%b%B", localtime (time ())))
-%! && isstr (strftime ("%c%C%d%e%D%h%j", localtime (time ())))
-%! && isstr (strftime ("%m%U%w%W%x%y%Y", localtime (time ())))));
+%!assert((ischar (strftime ("%%%n%t%H%I%k%l", localtime (time ())))
+%! && ischar (strftime ("%M%p%r%R%s%S%T", localtime (time ())))
+%! && ischar (strftime ("%X%Z%z%a%A%b%B", localtime (time ())))
+%! && ischar (strftime ("%c%C%d%e%D%h%j", localtime (time ())))
+%! && ischar (strftime ("%m%U%w%W%x%y%Y", localtime (time ())))));
 
 %!error <Invalid call to strftime.*> strftime ();
 
diff -r cb9c3570d66f -r 09d7e27e01a5 src/file-io.cc
--- a/src/file-io.cc	Sat May 03 10:47:56 2008 +0200
+++ b/src/file-io.cc	Sat May 03 11:47:54 2008 +0200
@@ -1734,7 +1734,7 @@ For example,\n\
 @example\n\
 @group\n\
 fid = popen (\"ls -ltr / | tail -3\", \"r\");\n\
-while (isstr (s = fgets (fid)))\n\
+while (ischar (s = fgets (fid)))\n\
   fputs (stdout, s);\n\
 endwhile\n\
      @print{} drwxr-xr-x  33 root  root  3072 Feb 15 13:28 etc\n\
diff -r cb9c3570d66f -r 09d7e27e01a5 test/ChangeLog
--- a/test/ChangeLog	Sat May 03 10:47:56 2008 +0200
+++ b/test/ChangeLog	Sat May 03 11:47:54 2008 +0200
@@ -1,3 +1,7 @@ 2008-03-26  David Bateman  <dbateman@fre
+2008-05-03  Rafael Laboissiere <rafael@debian.org>
+
+	* test_io.m, test_system.m: Use ischar instead of deprecated isstr.
+
 2008-03-26  David Bateman  <dbateman@free.fr>
 
 	* test_index-wfi-f.m: Split large block of tests.  New tests.
diff -r cb9c3570d66f -r 09d7e27e01a5 test/test_io.m
--- a/test/test_io.m	Sat May 03 10:47:56 2008 +0200
+++ b/test/test_io.m	Sat May 03 11:47:54 2008 +0200
@@ -240,8 +240,8 @@
 %! [v2, c2, m2] = sscanf ("1 2 bar 3 4 5 6", "%d");
 %! 
 %! assert((a == 1.2 && b == 3 && c == "foo"
-%! && v1 == [1; 2; 3; 4; 5; 6] && c1 == 6 && isstr (m1)
-%! && v2 == [1; 2] && c2 == 2 && isstr (m2)));
+%! && v1 == [1; 2; 3; 4; 5; 6] && c1 == 6 && ischar (m1)
+%! && v2 == [1; 2] && c2 == 2 && ischar (m2)));
 
 %% test/octave.test/io/sscanf-2.m
 %!error <Invalid call to sscanf.*> sscanf ();
@@ -281,7 +281,7 @@
 %!test
 %! [s, msg, status] = sprintf ("%s: %d\n", "test", 1);
 %! 
-%! assert(s == "test: 1\n" && isstr (msg) && status == 8);
+%! assert(s == "test: 1\n" && ischar (msg) && status == 8);
 
 %% test/octave.test/io/sprintf-2.m
 %!error sprintf (1);
@@ -370,7 +370,7 @@
 %!error <Invalid call to fclose.*> fclose (1, 2);
 
 %% test/octave.test/io/tmpnam-1.m
-%!assert(isstr (tmpnam ()));
+%!assert(ischar (tmpnam ()));
 
 %% test/octave.test/io/tmpnam-2.m
 %!warning tmpnam (1);
diff -r cb9c3570d66f -r 09d7e27e01a5 test/test_system.m
--- a/test/test_system.m	Sat May 03 10:47:56 2008 +0200
+++ b/test/test_system.m	Sat May 03 11:47:54 2008 +0200
@@ -185,7 +185,7 @@
 %! && struct_contains (s, "atime")
 %! && struct_contains (s, "mtime")
 %! && struct_contains (s, "ctime")
-%! && isstr (msg)));
+%! && ischar (msg)));
 
 %% test/octave.test/system/stat-2.m
 %!error <Invalid call to stat.*> stat ();
@@ -208,7 +208,7 @@
 %! && struct_contains (s, "atime")
 %! && struct_contains (s, "mtime")
 %! && struct_contains (s, "ctime")
-%! && isstr (msg)));
+%! && ischar (msg)));
 
 %% test/octave.test/system/lstat-2.m
 %!error <Invalid call to lstat.*> lstat ();
@@ -241,7 +241,7 @@
 %!error <Invalid call to fnmatch.*> fnmatch ("foo", "bar", 3);
 
 %% test/octave.test/system/file_in_path-1.m
-%!assert(isstr (file_in_path (path (), "date.m")));
+%!assert(ischar (file_in_path (path (), "date.m")));
 
 %% test/octave.test/system/file_in_path-2.m
 %!error <invalid option> file_in_path ("foo", "bar", 1);
@@ -363,7 +363,7 @@
 %!error cd (1);
 
 %% test/octave.test/system/pwd-1.m
-%!assert(isstr (pwd ()));
+%!assert(ischar (pwd ()));
 
 %% test/octave.test/system/getpwent-1.m
 %!testif HAVE_GETPWENT

Reply to: