From 280c0eece7bb987e7f3ca49a9e9e1515f3f35cfd Mon Sep 17 00:00:00 2001 From: Samuel GOUGEON Date: Sat, 24 Feb 2018 18:48:03 +0100 Subject: [PATCH] * Bug 15309 fixed: eval() actual removal http://bugzilla.scilab.org/15309 Code already cleaned in https://codereview.scilab.org/19515 Change-Id: Ifa2849a4ed217c879bf316d68c5338936b2d4895 --- scilab/CHANGES.md | 5 + .../helptools/data/configuration/scilab_macros.txt | 1 - scilab/modules/slint/src/cpp/DeprecatedChecker.cpp | 4 +- scilab/modules/string/help/en_US/eval.xml | 80 ------------- scilab/modules/string/help/fr_FR/eval.xml | 54 --------- scilab/modules/string/help/ja_JP/eval.xml | 124 -------------------- scilab/modules/string/help/pt_BR/eval.xml | 64 ---------- scilab/modules/string/help/ru_RU/eval.xml | 79 ------------- scilab/modules/string/macros/eval.sci | 38 ------ .../modules/string/tests/nonreg_tests/bug_7282.tst | 28 ----- 10 files changed, 7 insertions(+), 470 deletions(-) delete mode 100644 scilab/modules/string/help/en_US/eval.xml delete mode 100644 scilab/modules/string/help/fr_FR/eval.xml delete mode 100644 scilab/modules/string/help/ja_JP/eval.xml delete mode 100644 scilab/modules/string/help/pt_BR/eval.xml delete mode 100644 scilab/modules/string/help/ru_RU/eval.xml delete mode 100644 scilab/modules/string/macros/eval.sci delete mode 100644 scilab/modules/string/tests/nonreg_tests/bug_7282.tst diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md index 2ed67c9..c87346b 100644 --- a/scilab/CHANGES.md +++ b/scilab/CHANGES.md @@ -177,7 +177,11 @@ Obsolete functions or features Removed Functions ----------------- +<<<<<<< HEAD * `getPreferencesValue` was obsolete and has been removed. Please use `xmlGetValues` instead. +======= +* `eval` was obsolete and has been removed. Please use `evstr` instead. +>>>>>>> 1ec71c6c514... * Bug 15309 fixed: eval() actual removal * `hypermat` was obsolete and has been removed. Please use `matrix` instead. * `square` was obsolete and has been removed. * `xgetech` was obsolete and has been removed. Please use `gca` instead. @@ -227,6 +231,7 @@ Bug Fixes * [#15248](http://bugzilla.scilab.org/show_bug.cgi?id=15248): `lsq()`was leaking memory. * [#15269](http://bugzilla.scilab.org/show_bug.cgi?id=15269): `xgetech` was poor and stiff compared to any combination of `gca()` properties `.axes_bounds`, `.data_bounds`, `.log_flags`, and `.margins`. It is removed. * [#15271](http://bugzilla.scilab.org/show_bug.cgi?id=15271): `bitget` needed to be upgraded. +* [#15309](http://bugzilla.scilab.org/show_bug.cgi?id=15309): `eval()` was a weak duplicate of `evstr()`. It should be removed. * [#15321](http://bugzilla.scilab.org/show_bug.cgi?id=15321): `lu()` was leaking memory. * [#15350](http://bugzilla.scilab.org/show_bug.cgi?id=15350): `ric_desc()` should be merged into `riccati()`. * [#15368](http://bugzilla.scilab.org/show_bug.cgi?id=15368): `freson()` silently returned frequencies not corresponding to a maximum, or returned [] instead of some still computable maxima frequencies. diff --git a/scilab/modules/helptools/data/configuration/scilab_macros.txt b/scilab/modules/helptools/data/configuration/scilab_macros.txt index 19fac85..746c2c6 100644 --- a/scilab/modules/helptools/data/configuration/scilab_macros.txt +++ b/scilab/modules/helptools/data/configuration/scilab_macros.txt @@ -449,7 +449,6 @@ ascii2string asciimat blanks cat_code -eval evstr expression2code format_txt diff --git a/scilab/modules/slint/src/cpp/DeprecatedChecker.cpp b/scilab/modules/slint/src/cpp/DeprecatedChecker.cpp index aa2d589..e233651 100644 --- a/scilab/modules/slint/src/cpp/DeprecatedChecker.cpp +++ b/scilab/modules/slint/src/cpp/DeprecatedChecker.cpp @@ -1,10 +1,9 @@ /* * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET + * Copyright (C) 2012 - 2016 - Scilab Enterprises * Copyright (C) 2017, 2018 - Samuel GOUGEON * - * 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, @@ -105,6 +104,7 @@ std::unordered_map DeprecatedChecker::initDep() map.emplace(L"datatipToggle", L"datatipManagerMode"); map.emplace(L"denom", L".den"); map.emplace(L"frexp", L"log2"); + map.emplace(L"eval", L"evstr"); map.emplace(L"getPreferencesValue", L"xmlGetValues"); map.emplace(L"hypermat", L"zeros|matrix"); map.emplace(L"lstsize", L"size"); diff --git a/scilab/modules/string/help/en_US/eval.xml b/scilab/modules/string/help/en_US/eval.xml deleted file mode 100644 index bc82657..0000000 --- a/scilab/modules/string/help/en_US/eval.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - eval - - evaluation of a matrix of strings (obsolete) - - - - Syntax - [H] = eval(Z) - - - Arguments - - - Z - - a matrix of character string. - - - - - - Description - - The eval function returns the evaluation of the matrix of character strings - Z. - - - - Examples - - - - See also - - - evstr - - - execstr - - - - - History - - - 6.0.1 - - eval() is declared obsolete, to be removed from Scilab 6.1.0. - Please use evstr() instead. - - - - - diff --git a/scilab/modules/string/help/fr_FR/eval.xml b/scilab/modules/string/help/fr_FR/eval.xml deleted file mode 100644 index 53e0f96..0000000 --- a/scilab/modules/string/help/fr_FR/eval.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - eval - - évaluation d'une matrice de chaînes de caractères (obsolète) - - - - Séquence d'appel - [H]= eval(Z) - - - Description - renvoie le résultat de l'évaluation d'une matrice de chaînes de - caractères Z. - - - - Exemples - - - - Voir aussi - - - evstr - - - execstr - - - - - Historique - - - 6.0.1 - - eval() est déclarée obsolète, pour un retrait de Scilab 6.1.0. - SVP la remplacer par evstr(). - - - - - diff --git a/scilab/modules/string/help/ja_JP/eval.xml b/scilab/modules/string/help/ja_JP/eval.xml deleted file mode 100644 index 2f8fc4a..0000000 --- a/scilab/modules/string/help/ja_JP/eval.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - eval - - 文字列の行列を評価する (obsolete) - - - - - - - 呼び出し手順 - - [H] = eval(Z) - - - - - - 引数 - - - - - - Z - - - - 文字列の行列. - - - - - - - - - - - - 説明 - - - - eval関数は, - - 文字列の行列Zを評価したものを返します. - - - - - - - - 例 - - - - - - - - S参照 - - - - - - evstr - - - - - - execstr - - - - - - - - 履歴 - - - 6.0.1 - - eval() is declared obsolete, to be removed from Scilab 6.1.0. - Please use evstr() instead. - - - - - - - diff --git a/scilab/modules/string/help/pt_BR/eval.xml b/scilab/modules/string/help/pt_BR/eval.xml deleted file mode 100644 index 0b20412..0000000 --- a/scilab/modules/string/help/pt_BR/eval.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - eval - avaliação de uma matriz de strings (obsolete) - - - - Seqüência de Chamamento - [H]= eval(Z) - - - Descrição - Retorna a avaliação da matriz de strings - Z. - - - - Exemplos - - - - Ver Também - - - evstr - - - execstr - - - - - Histórico - - - 6.0.1 - - eval() is declared obsolete, to be removed from Scilab 6.1.0. - Please use evstr() instead. - - - - - diff --git a/scilab/modules/string/help/ru_RU/eval.xml b/scilab/modules/string/help/ru_RU/eval.xml deleted file mode 100644 index 5295bae..0000000 --- a/scilab/modules/string/help/ru_RU/eval.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - eval - - вычисление матрицы строк (устарело) - - - - Синтаксис - [H] = eval(Z) - - - Аргументы - - - Z - - матрица символьных строк. - - - - - - Описание - - Функция eval возвращает вычисление матрицы символьных строк Z. - - - - Примеры - - - - Смотрите также - - - evstr - - - execstr - - - - - История - - - 6.0.1 - - eval() объявлена устаревшей, будет удалена из Scilab 6.1.0. - Пожалуйста, вместо неё используйте evstr(). - - - - - diff --git a/scilab/modules/string/macros/eval.sci b/scilab/modules/string/macros/eval.sci deleted file mode 100644 index f4914d7..0000000 --- a/scilab/modules/string/macros/eval.sci +++ /dev/null @@ -1,38 +0,0 @@ -// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab -// Copyright (C) INRIA - -// Copyright (C) DIGITEO - 2010 - Allan CORNET -// Copyright (C) 2016 - Samuel GOUGEON -// -// 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 _h = eval(z) - // Syntax : H = eval(Z) - // returns the evaluation of the matrix of character strings Z. - // Example: a=1; b=2; Z=['a','b'] ; eval(Z) returns the matrix [1,2]; - - warnobsolete("evstr()", "6.1"); - - [nL,nC] = size(z); - if nL * nC > 1 then - L = (1:nL)'*ones(1,nC) - C = ones(nL,1)*(1:nC) - //str = "_h("+string(L)+","+string(C)+")="+z // format()-dependent - str = msprintf("_h(%d,%d)=%s\n",L(:),C(:),z(:)) // format()-independent - elseif z~=[] - str = "_h = " + z; - else - _h = [] - return - end - deff("_h = %eval();", str) - _h = %eval() - -endfunction diff --git a/scilab/modules/string/tests/nonreg_tests/bug_7282.tst b/scilab/modules/string/tests/nonreg_tests/bug_7282.tst deleted file mode 100644 index 92491e8..0000000 --- a/scilab/modules/string/tests/nonreg_tests/bug_7282.tst +++ /dev/null @@ -1,28 +0,0 @@ -// ============================================================================= -// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab -// Copyright (C) 2010 - DIGITEO - Allan CORNET -// -// This file is distributed under the same license as the Scilab package. -// ============================================================================= - -// <-- CLI SHELL MODE --> -// <-- NO CHECK REF --> -// <-- Non-regression test for bug 7282 --> -// -// <-- Bugzilla URL --> -// http://bugzilla.scilab.org/show_bug.cgi?id=7282 -// -// <-- Short Description --> -// eval failed on some functions without output arguments. -errmsg = msprintf(gettext("%s: Wrong number of output argument(s): %d expected.\n"), "realtimeinit", 0); -str = "realtimeinit(60)"; -assert_checkerror("eval(str)", errmsg); - -function o = blabla() - o = 3; -endfunction - -r = eval("blabla()"); -if r <> 3 then pause, end - - -- 1.7.9.5