* Bug 15628 fixed: actual removal of with_tk() 96/20596/5
Samuel GOUGEON [Tue, 30 Oct 2018 23:39:49 +0000 (00:39 +0100)]
  http://bugzilla.scilab.org/15628

  Was deprecated at https://codereview.scilab.org/20181

Change-Id: I45e867a6ed509e31fc6c0bb6a903c15852df152b

scilab/CHANGES.md
scilab/modules/completion/tests/nonreg_tests/bug_2848.tst
scilab/modules/core/help/en_US/configuration/with_tk.xml [deleted file]
scilab/modules/core/help/ja_JP/configuration/with_tk.xml [deleted file]
scilab/modules/core/help/pt_BR/configuration/with_tk.xml [deleted file]
scilab/modules/core/help/ru_RU/configuration/with_tk.xml [deleted file]
scilab/modules/core/macros/with_tk.sci [deleted file]
scilab/modules/functions/tests/unit_tests/whereis.tst
scilab/modules/helptools/data/configuration/scilab_macros.txt

index 8e0365b..d79cfff 100644 (file)
@@ -193,6 +193,7 @@ Removed Functions
 * `fac3d` was obsolete since Scilab 4 and has been removed. Please use `plot3d` instead.
 * `fac3d1` was obsolete since Scilab 4 and has been removed. Please use `plot3d1` instead.
 * `xinfo` was obsolete and has been removed. Please use `gcf().info_message` instead.
+* `with_tk` was obsolete and has been removed. Please use `with_module('tclsci')` instead.
 
 
 Known issues
@@ -273,6 +274,7 @@ Bug Fixes
 * [#15715](http://bugzilla.scilab.org/show_bug.cgi?id=15715): `%nan` indices crashed Scilab.
 * [#15742](http://bugzilla.scilab.org/show_bug.cgi?id=15742): The `compatibility_functions` module should be merged in the `m2sci` one.
 * [#15581](http://bugzilla.scilab.org/show_bug.cgi?id=15581): display of complex matrix was ugly.
+* [#15628](http://bugzilla.scilab.org/show_bug.cgi?id=15628): `with_tk` was a duplicate of `with_module('tclsci')`. It is removed.
 * [#15680](http://bugzilla.scilab.org/show_bug.cgi?id=15680): `loadmatfile` could not return variables in a structure instead of into the calling environment.
 * [#15701](http://bugzilla.scilab.org/show_bug.cgi?id=15701): `A\B` was not faster when `A` is square and triangular.
 * [#15734](http://bugzilla.scilab.org/show_bug.cgi?id=15734):  Trivial infinite loop could not be interrupted.
index 7202a69..5ec3927 100644 (file)
@@ -4,14 +4,14 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- CLI SHELL MODE -->
 // <-- NO CHECK REF -->
-
+//
 // <-- Non-regression test for bug 2848 -->
 //
 // <-- Bugzilla URL -->
-// http://bugzilla.scilab.org/show_bug.cgi?id=2848
+// http://bugzilla.scilab.org/2848
 //
 // <-- Short Description -->
 //    When using the TAB key for completion in the console, after using once a Scilab
 [a, b, c, d] = completion("with");
 assert_checkequal(c, []);
 
-with_tk();
+with_javasci();
 [a, b, c, d]=completion("with");
 assert_checkequal(c, []);
 
-clear with_tk
+clear with_javasci
 [a, b, c, d]=completion("with");
 assert_checkequal(c, []);
 
-with_tk();
+with_javasci();
 
 function x = with_foo(y, z)
     x = y + z;
@@ -42,16 +42,14 @@ ref_c = [];
 ref_d = ["with_foo"; ..
 "with_javasci"; ..
 "with_macros_source"; ..
-"with_modelica_compiler"; ..
-"with_tk"];
+"with_modelica_compiler"];
 
 assert_checkequal(a, ref_a);
 assert_checkequal(b, ref_b);
 assert_checkequal(c, ref_c);
 assert_checkequal(d, ref_d);
 
-clear with_tk
-clear with_foo
+clear with_javasci with_foo
 
 [a,b,c,d] = completion("with");
 assert_checkequal(c, []);
diff --git a/scilab/modules/core/help/en_US/configuration/with_tk.xml b/scilab/modules/core/help/en_US/configuration/with_tk.xml
deleted file mode 100644 (file)
index 1ba89eb..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="with_tk">
-    <refnamediv>
-        <refname>with_tk</refname>
-        <refpurpose>
-            Checks if Scilab has been built with TCL/TK (<emphasis role="bold">obsolete</emphasis>)
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Syntax</title>
-        <synopsis>r = with_tk()</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Arguments</title>
-        <variablelist>
-            <varlistentry>
-                <term>r</term>
-                <listitem>
-                    <para>a boolean</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Description</title>
-        <warning>
-            <literal>with_tk()</literal> will no longer be available in Scilab 6.1.
-            Please use <literal>with_module("tclsci")</literal> instead.
-        </warning>
-        <para>
-            Returns <constant>%t</constant> if Scilab has been built  with TCL/TK
-            interface or <constant>%f</constant> if not.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-if with_tk() == %t then
-   disp("Tk is available");
-else
-   disp("Tk is not available");
-end
- ]]></programlisting>
-    </refsection>
-    <refsection role="history">
-        <title>History</title>
-        <revhistory>
-            <revision>
-                <revnumber>6.0.2</revnumber>
-                <revdescription>
-                    with_tk() is declared obsolete to be removed from Scilab 6.1.
-                    It may be replaced with <literal>with_module("tclsci")</literal>.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/core/help/ja_JP/configuration/with_tk.xml b/scilab/modules/core/help/ja_JP/configuration/with_tk.xml
deleted file mode 100644 (file)
index cdad0c8..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ja" xml:id="with_tk">
-    <refnamediv>
-        <refname>with_tk</refname>
-        <refpurpose>
-            Scilab にTCL/TKが組み込まれているかどうかを調べる (<emphasis role="bold">obsolete</emphasis>)
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>呼出し手順</title>
-        <synopsis>r = with_tk()</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>引数</title>
-        <variablelist>
-            <varlistentry>
-                <term>r</term>
-                <listitem>
-                    <para>論理値</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>説明</title>
-        <warning>
-            <literal>with_tk()</literal> will no longer be available in Scilab 6.1.
-            Please use <literal>with_module("tclsci")</literal> instead.
-        </warning>
-        <para>
-            ScilabがTCL/TKインターフェイスと共に構築されている場合に
-            <constant>%t</constant>, そうでない場合に <constant>%f</constant>
-            を返します.
-        </para>
-    </refsection>
-    <refsection>
-        <title>例</title>
-        <programlisting role="example"><![CDATA[
-if with_tk() == %t then
-   disp("Tk is available");
-else
-   disp("Tk is not available");
-end
- ]]></programlisting>
-    </refsection>
-    <refsection role="history">
-        <title>履歴</title>
-        <revhistory>
-            <revision>
-                <revnumber>6.0.2</revnumber>
-                <revdescription>
-                    with_tk() is declared obsolete to be removed from Scilab 6.1.
-                    It may be replaced with <literal>with_module("tclsci")</literal>.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/core/help/pt_BR/configuration/with_tk.xml b/scilab/modules/core/help/pt_BR/configuration/with_tk.xml
deleted file mode 100644 (file)
index 75249c1..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="with_tk" xml:lang="pt">
-    <refnamediv>
-        <refname>with_tk</refname>
-        <refpurpose>
-            checa se o Scilab foi construído com TCL/TK  (<emphasis role="bold">obsolete</emphasis>)
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
-        <synopsis>r=with_tk()</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Parâmetros</title>
-        <variablelist>
-            <varlistentry>
-                <term>r</term>
-                <listitem>
-                    <para>um booleano</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Descrição</title>
-        <warning>
-            <literal>with_tk()</literal> will no longer be available in Scilab 6.1.
-            Please use <literal>with_module("tclsci")</literal> instead.
-        </warning>
-        <para>
-            Retorna <literal>%t</literal> se o Scilab tiver sido construído com
-            a interface TCL/TK ou <literal>%f</literal> se não.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Exemplos</title>
-        <programlisting role="example"><![CDATA[
-if with_tk() == %t then
-   disp("Tk is available");
-else
-   disp("Tk is not available");
-end
- ]]></programlisting>
-    </refsection>
-    <refsection role="history">
-        <title>Histórico</title>
-        <revhistory>
-            <revision>
-                <revnumber>6.0.2</revnumber>
-                <revdescription>
-                    with_tk() is declared obsolete to be removed from Scilab 6.1.
-                    It may be replaced with <literal>with_module("tclsci")</literal>.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/core/help/ru_RU/configuration/with_tk.xml b/scilab/modules/core/help/ru_RU/configuration/with_tk.xml
deleted file mode 100644 (file)
index 5631446..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="ru" xml:id="with_tk">
-    <refnamediv>
-        <refname>with_tk</refname>
-        <refpurpose>
-            проверка: собран ли Scilab с TCL/TK  (<emphasis role="bold">obsolete</emphasis>)
-        </refpurpose>
-    </refnamediv>
-    <refsynopsisdiv>
-        <title>Синтаксис</title>
-        <synopsis>r = with_tk()</synopsis>
-    </refsynopsisdiv>
-    <refsection>
-        <title>Аргументы</title>
-        <variablelist>
-            <varlistentry>
-                <term>r</term>
-                <listitem>
-                    <para>логическое значение</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Описание</title>
-        <warning>
-            <literal>with_tk()</literal> will no longer be available in Scilab 6.1.
-            Please use <literal>with_module("tclsci")</literal> instead.
-        </warning>
-        <para>
-            Возвращает <constant>%t</constant>, если Scilab собран с TCL/TK-интерфейсом, и
-            <constant>%f</constant>, если нет.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Примеры</title>
-        <programlisting role="example"><![CDATA[
-if with_tk() == %t then
-   disp("Tk доступен");
-else
-   disp("Tk не доступен");
-end
- ]]></programlisting>
-    </refsection>
-    <refsection role="history">
-        <title>История</title>
-        <revhistory>
-            <revision>
-                <revnumber>6.0.2</revnumber>
-                <revdescription>
-                    with_tk() is declared obsolete to be removed from Scilab 6.1.
-                    It may be replaced with <literal>with_module("tclsci")</literal>.
-                </revdescription>
-            </revision>
-        </revhistory>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/core/macros/with_tk.sci b/scilab/modules/core/macros/with_tk.sci
deleted file mode 100644 (file)
index c6c79a2..0000000
+++ /dev/null
@@ -1,16 +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 r = with_tk()
-    warnobsolete("with_module(''tclsci'')","6.1")
-    r = (with_module("tclsci") & getscilabmode() <> "NWNI");
-endfunction
index 6a5dc01..a9784e9 100644 (file)
@@ -19,9 +19,6 @@ assert_checkequal(whereis(sci2exp), "stringlib");
 assert_checkequal(whereis("getshell"), "corelib");
 assert_checkequal(whereis(getshell), "corelib");
 
-a = corelib;
-assert_checkequal(whereis("with_tk"), ["a" ; "corelib"]);
-
 //builtin
 assert_checkequal(whereis("exit"), "core");
 assert_checkequal(whereis(exit), "core");