saveafterncommands() set obsolete 79/21379/4
Samuel GOUGEON [Fri, 21 Feb 2020 02:36:29 +0000 (03:36 +0100)]
Change-Id: Ibe37b6aa9d6baa137b26541fc1c693db6b5e5ba7

scilab/CHANGES.md
scilab/modules/history_manager/help/en_US/saveafterncommands.xml
scilab/modules/history_manager/help/ja_JP/saveafterncommands.xml
scilab/modules/history_manager/sci_gateway/cpp/sci_saveafterncommands.cpp
scilab/modules/slint/src/cpp/DeprecatedChecker.cpp

index 529b145..b33a897 100644 (file)
@@ -235,6 +235,7 @@ Obsolete functions or features
 * `get_figure_handle(n)` is obsolete. Please use `findobj('figure_id',n)` instead.
 * `hist3d` is renamed `bar3d`. The former `hist3d` function is declared obsolete and will be replaced by an actual 3D histogram function in Scilab 6.2.
 * `scatter3` is obsolete. Please use `scatter3d` instead.
+* `saveafterncommands` is canceled. It will be removed from Scilab 6.1.x
 
 Removed Functions
 -----------------
index fc88b61..3541648 100644 (file)
  * along with this program.
  *
  -->
-<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="saveafterncommands">
+<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="saveafterncommands">
     <refnamediv>
         <refname>saveafterncommands</refname>
-        <refpurpose>Save the history file after n statements are added to the file.</refpurpose>
+        <refpurpose>
+            Save the history file after n statements are added to the file
+            <emphasis role="bold">(obsolete)</emphasis>
+    </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>saveafterncommands(n)
+        <synopsis>
+            saveafterncommands(n)
             v = saveafterncommands()
         </synopsis>
     </refsynopsisdiv>
     </refsection>
     <refsection>
         <title>Description</title>
+        <warning>
+            saveafterncommand(..) is canceled and does nothing. The history is now always
+            updated after each instruction run in the console. saveafterncommand(..) will
+            be removed from Scilab 6.1.x.
+        </warning>
         <para>Save the history file after n statements are added to the file.</para>
         <para>For example, when you select the option and set n to 5, after every 5 statements are added,
             the history file is automatically saved.
 saveafterncommands(3)
  ]]></programlisting>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>
+                    saveafterncommands(..) is canceled. It will be removed from Scilab 6.1.x
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 7725667..b40f447 100644 (file)
@@ -17,7 +17,8 @@
     <refnamediv>
         <refname>saveafterncommands</refname>
         <refpurpose>
-            ファイルにn個の命令を追加した後,履歴ファイルを保存する.
+            ファイルにn個の命令を追加した後,履歴ファイルを保存する
+            <emphasis role="bold">(obsolete)</emphasis>
         </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
     </refsection>
     <refsection>
         <title>説明</title>
+        <warning>
+            saveafterncommand(..) is canceled and does nothing. The history is now always
+            updated after each instruction run in the console. saveafterncommand(..) will
+            be removed from Scilab 6.1.x.
+        </warning>
         <para>
             ファイルにn個の命令を追加した後,履歴ファイルを保存します.
         </para>
 saveafterncommands(3)
  ]]></programlisting>
     </refsection>
+    <refsection role="history">
+        <title>履歴</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>
+                    saveafterncommands(..) is canceled. It will be removed from Scilab 6.1.x
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 927a76e..451b317 100644 (file)
@@ -22,6 +22,7 @@
 extern "C"
 {
 #include "sci_malloc.h"
+#include "sciprint.h"
 #include "localization.h"
 #include "Scierror.h"
 }
@@ -29,6 +30,9 @@ extern "C"
 
 types::Function::ReturnValue sci_saveafterncommands(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
+    sciprint(_("%s: This function is canceled. It will be permanently removed in Scilab %s\n"), "saveaftercommands", "6.1.x");
+
+    /*
     if (in.size() == 0)
     {
         int num = HistoryManager::getInstance()->getAfterHowManyLinesHistoryIsSaved();
@@ -58,6 +62,8 @@ types::Function::ReturnValue sci_saveafterncommands(types::typed_list &in, int _
         Scierror(77, _("%s: Wrong number of input argument(s): %d to %d expected.\n"), "saveafterncommands", 0, 1);
         return types::Function::Error;
     }
+    */
+
     return types::Function::OK;
 }
 /*--------------------------------------------------------------------------*/
index 91ce849..09631c3 100644 (file)
@@ -93,7 +93,6 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
     std::unordered_map<std::wstring, std::wstring> map;
 
     // Scilab 6.1.0 => 6.1.x
-    map.emplace(L"setPreferencesValue", L"xmlSetValues");
 
     // Scilab 6.0.x => 6.1.0
     map.emplace(L"get_figure_handle", L"findobj(\'figure_id\',n)");
@@ -114,6 +113,8 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
     map.emplace(L"noisegen", L"grand");
     map.emplace(L"numer", L".num");
     map.emplace(L"ric_desc", L"riccati");
+    map.emplace(L"saveafterncommands", L"");
+    map.emplace(L"setPreferencesValue", L"xmlSetValues");
     map.emplace(L"square", L"replot");
     map.emplace(L"sysdiag", L"blockdiag");
     map.emplace(L"with_tk", L"with_module('tclsci')");