Dead macros: %ce_p and %ce_string removed 17/19317/4
Samuel GOUGEON [Sat, 1 Jul 2017 13:06:08 +0000 (15:06 +0200)]
 These macros prove to no longer be used. Tests done:
  * edit each of them
  * add a disp("OK") in first line
  * exec them to load them
  * None of the following calls displays "OK":
    c = {1 1 ; 2 2}
    string(c)
    c = makecell([2 2 2], %pi, %i, %s, %z, %t, 1/%z, "abc", gdf())
    string(c)

  Nevertheless, the built-in replacement proves to be much poorer and
  less convenient: http://bugzilla.scilab.org/14053

  After removal, tests for data_strutures and overloading are run
  without side effect.

Change-Id: I7682a48af26ced5b92d67d053dd0d110ea1e75d2

scilab/modules/overloading/macros/%ce_p.sci [deleted file]
scilab/modules/overloading/macros/%ce_string.sci [deleted file]

diff --git a/scilab/modules/overloading/macros/%ce_p.sci b/scilab/modules/overloading/macros/%ce_p.sci
deleted file mode 100644 (file)
index 75d262f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) INRIA
-//
-// Copyright (C) 2012 - 2016 - Scilab Enterprises
-//
-// This file is hereby licensed under the terms of the GNU GPL v2.0,
-// pursuant to article 5.3.4 of the CeCILL v.2.1.
-// This file was originally licensed under the terms of the CeCILL v2.1,
-// and continues to be available under such terms.
-// For more information, see the COPYING file which you should have received
-// along with this program.
-function %ce_p(c)
-    disp(%ce_string(c))
-endfunction
diff --git a/scilab/modules/overloading/macros/%ce_string.sci b/scilab/modules/overloading/macros/%ce_string.sci
deleted file mode 100644 (file)
index d699905..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) INRIA
-//
-// Copyright (C) 2012 - 2016 - Scilab Enterprises
-//
-// This file is hereby licensed under the terms of the GNU GPL v2.0,
-// pursuant to article 5.3.4 of the CeCILL v.2.1.
-// This file was originally licensed under the terms of the CeCILL v2.1,
-// and continues to be available under such terms.
-// For more information, see the COPYING file which you should have received
-// along with this program.
-function str = %ce_string(c)
-    str=[];
-    ll = lines()
-    val = c{:}
-    dims = size(c);
-    if type(val)==15 then // Whole cell array display
-        for k=1:length(val)
-            tp = typeof(val(k))
-            sz = size(val(k))
-            if tp=="st" then
-                str(k)="{"+strcat(string(sz),"x")+" struct}"
-                //str(k)=%st_string(val(k))
-            else
-                if prod(sz)==0 then
-                    str(k)="{}"
-                else
-                    tmp=sci2exp(val(k),ll(1))
-                    if size(tmp,"*")==1 then
-                        str(k)=tmp
-                    else
-                        str(k)="{"+strcat(string(sz),"x")+" "+tp+"}"
-                    end
-                end
-            end
-        end
-    else // cell display
-        tp = typeof(val)
-        sz = size(val)
-        dims = [1 1]
-        if tp=="st" then
-            str="{"+strcat(string(sz),"x")+" struct}"
-        else
-            if prod(sz)==0 then
-                str="{}"
-            else
-                tmp=sci2exp(val,ll(1))
-                if size(tmp,"*")==1 then
-                    str=tmp
-                else
-                    str="{"+strcat(string(sz),"x")+" "+tp+"}"
-                end
-            end
-        end
-    end
-
-    if size(dims,"*")>2 then
-        str=matrix(str, dims)
-    else
-        str=matrix(str,dims(1),-1)
-    end
-endfunction
-