* `strcmpi` is deprecated. Please use `strcmp(..,"i")`instead. 24/18324/7
Samuel GOUGEON [Wed, 29 Jun 2016 18:22:49 +0000 (20:22 +0200)]
* Bug #12837: strcmpi() set obsolete. Replaced with strcmp(.,.,'i')

  http://bugzilla.scilab.org/12837
  Former commit https://codereview.scilab.org/#/c/13726 (5.5 branch: to be abandoned)
  All files having the "strcmpi" pattern have been visited

Change-Id: Ia71fa6f30ba76585131b5f4bc100f5dcb624b371

23 files changed:
scilab/CHANGES.md
scilab/modules/atoms/macros/atomsInstall.sci
scilab/modules/atoms/macros/atomsLoad.sci
scilab/modules/atoms/macros/atomsRemove.sci
scilab/modules/atoms/macros/atomsSetConfig.sci
scilab/modules/atoms/macros/atomsUpdate.sci
scilab/modules/atoms/macros/atoms_internals/atomsDisp.sci
scilab/modules/atoms/macros/atoms_internals/atomsGetPlatform.sci
scilab/modules/dynamic_link/macros/dllinfo.sci
scilab/modules/dynamic_link/macros/windows/dlwDllInfo.sci
scilab/modules/gui/macros/findobj.sci
scilab/modules/slint/src/cpp/DeprecatedChecker.cpp
scilab/modules/string/help/en_US/strcmp.xml
scilab/modules/string/help/en_US/strcmpi.xml
scilab/modules/string/help/ja_JP/strcmp.xml
scilab/modules/string/help/ja_JP/strcmpi.xml
scilab/modules/string/help/pt_BR/strcmp.xml
scilab/modules/string/help/pt_BR/strcmpi.xml
scilab/modules/string/help/ru_RU/strcmp.xml
scilab/modules/string/help/ru_RU/strcmpi.xml
scilab/modules/string/macros/strcmpi.sci
scilab/modules/string/tests/unit_tests/strcmpi.dia.ref [deleted file]
scilab/modules/string/tests/unit_tests/strcmpi.tst [deleted file]

index 07d2ccc..c1abd5f 100644 (file)
@@ -27,7 +27,6 @@ In summary, the main new features are:
 * Newsfeed, providing a continuous feed of news, tips, and general communication from the community and from Scilab Enterprises.
 * Licensing change: Scilab is now released under the terms of the GNU General Public License (GPL) v2.0 (but continues to be available under the terms of the CeCILL v2.1).
 
-
 Installation
 ------------
 
@@ -196,6 +195,8 @@ Obsolete functions or features
 * `maxfiles` is now obsolete.
 * `isoview(xmin,xmax,ymin,ymax)` is deprecated. Please use `isoview("on"), replot(..)` instead.
 * `eval3d` will be removed from Scilab 6.1. Please use `ndgrid` instead.
+* `strcmpi` is deprecated. Please use `strcmp(..,"i")`instead.
+
 
 Removed Functions
 -----------------
index 135ec51..afac77a 100644 (file)
@@ -63,7 +63,7 @@ function result = atomsInstall(packages,section)
 
     // Verbose Mode ?
     // =========================================================================
-    if strcmpi(atomsGetConfig("Verbose"),"True") == 0 then
+    if strcmp(atomsGetConfig("Verbose"),"True", "i") == 0 then
         ATOMSVERBOSE = %T;
     else
         ATOMSVERBOSE = %F;
index ef3dc9d..6558675 100644 (file)
@@ -68,7 +68,7 @@ function result = atomsLoad(packages)
 
     // Verbose Mode ?
     // =========================================================================
-    if strcmpi(atomsGetConfig("Verbose"),"True") == 0 then
+    if strcmp(atomsGetConfig("Verbose"),"True", "i") == 0 then
         ATOMSVERBOSE = %T;
     else
         ATOMSVERBOSE = %F;
index 245f166..6704208 100644 (file)
@@ -67,7 +67,7 @@ function result = atomsRemove(packages,section,del)
 
     // Verbose Mode ?
     // =========================================================================
-    if strcmpi(atomsGetConfig("Verbose"),"True") == 0 then
+    if strcmp(atomsGetConfig("Verbose"),"True", "i") == 0 then
         ATOMSVERBOSE = %T;
     else
         ATOMSVERBOSE = %F;
index 8d88e12..ee025d5 100644 (file)
@@ -53,7 +53,7 @@ function nbChanges = atomsSetConfig(field, value)
 
     i=1;
     for element = field(:)'
-        if strcmpi("verbose",element) == 0 then
+        if strcmp("verbose",element, "i") == 0 then
             field(i) = convstr(part(element,1),"u") + part(element,2:length(element));
         else
             field(i) = convstr(part(element,1),"l") + part(element,2:length(element));
index 60ebd7e..a836bd3 100644 (file)
@@ -26,7 +26,7 @@ function result = atomsUpdate(name,section)
 
     // Verbose Mode ?
     // =========================================================================
-    if strcmpi(atomsGetConfig("Verbose"),"True") == 0 then
+    if strcmp(atomsGetConfig("Verbose"),"True", "i") == 0 then
         ATOMSVERBOSE = %T;
     else
         ATOMSVERBOSE = %F;
index 261586b..26ef74d 100644 (file)
@@ -35,7 +35,7 @@ function atomsDisp(str)
         if ATOMSVERBOSE then
             mprintf("%s",strcat(str,ascii(10)));
         end
-    elseif strcmpi(atomsGetConfig("Verbose"),"True") == 0
+    elseif strcmp(atomsGetConfig("Verbose"),"True", "i") == 0
         mprintf("%s",strcat(str,ascii(10)));
     end
 
index 6a9beb3..f5a133f 100644 (file)
@@ -19,9 +19,9 @@ function [OSNAME,ARCH,LINUX,MACOSX,SOLARIS,BSD] = atomsGetPlatform()
 
     if getos() <> "Windows" then
         OSNAME   = unix_g("uname");
-        MACOSX   = (strcmpi(OSNAME,"darwin") == 0);
-        LINUX    = (strcmpi(OSNAME,"linux")  == 0);
-        SOLARIS  = (strcmpi(OSNAME,"sunos")  == 0);
+        MACOSX   = (strcmp(OSNAME,"darwin", "i") == 0);
+        LINUX    = (strcmp(OSNAME,"linux", "i")  == 0);
+        SOLARIS  = (strcmp(OSNAME,"sunos", "i")  == 0);
         BSD      = (regexp(OSNAME ,"/BSD$/") <> []);
     else
         MACOSX  = %F;
index d0d1ef9..f329824 100644 (file)
@@ -37,7 +37,7 @@ function dllinfolist = dllinfo(dllname, options)
         end
 
         fext = fileext(dllname);
-        if ~(strcmpi(fext,".exe") == 0 | strcmpi(fext,".dll")== 0) then
+        if ~(strcmp(fext,".exe", "i") == 0 | strcmp(fext,".dll", "i")== 0) then
             error(msprintf(gettext("%s: Cannot open file %s.\n"),"dllinfo",dllname));
         end
 
@@ -45,7 +45,7 @@ function dllinfolist = dllinfo(dllname, options)
             error(msprintf(gettext("%s: Wrong type for input argument #%d: string expected.\n"),"dllinfo",2));
         end
 
-        if ~(strcmpi(options,"imports")== 0 | strcmpi(options,"exports")== 0 | strcmpi(options,"machine")== 0) then
+        if ~(strcmp(options,"imports","i")== 0 | strcmp(options,"exports", "i")== 0 | strcmp(options, "machine", "i")== 0) then
             error(msprintf(gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"),"dllinfo",2,"''imports'',''exports'',''machine''"));
         end
 
index 566a4b7..f2ebcc8 100644 (file)
@@ -109,7 +109,7 @@ function dllinfolist = dlwDllInfo(dllname, options)
     end
 
     fext = fileext(dllname);
-    if ~(strcmpi(fext, ".exe") == 0 | strcmpi(fext, ".dll")== 0) then
+    if ~(strcmp(fext, ".exe", "i") == 0 | strcmp(fext, ".dll", "i")== 0) then
         error(msprintf(gettext("%s: Cannot open file %s.\n"), "dllinfo", dllname));
     end
 
@@ -117,22 +117,22 @@ function dllinfolist = dlwDllInfo(dllname, options)
         error(msprintf(gettext("%s: Wrong type for input argument #%d: string expected.\n"), "dllinfo", 2));
     end
 
-    if ~(strcmpi(options, "imports")== 0 | strcmpi(options, "exports")== 0 | strcmpi(options, "machine")== 0) then
+    if ~(strcmp(options, "imports", "i")== 0 | strcmp(options, "exports", "i")== 0 | strcmp(options, "machine", "i")== 0) then
         error(msprintf(gettext("%s: Wrong value for input argument #%d: Must be in the set {%s}.\n"), "dllinfo", 2, "''imports'', ''exports'', ''machine''"));
     end
 
     dllinfolist = list();
 
     if findmsvccompiler() <> "unknown" then
-        if strcmpi(options, "imports")== 0 then
+        if strcmp(options, "imports", "i")== 0 then
             dllinfolist = dllinfoimports(dllname);
         end
 
-        if strcmpi(options, "exports")== 0 then
+        if strcmp(options, "exports", "i")== 0 then
             dllinfolist = dllinfoexports(dllname);
         end
 
-        if strcmpi(options, "machine")== 0 then
+        if strcmp(options, "machine", "i")== 0 then
             dllinfolist = dllinfomachine(dllname);
         end
 
index 643fafb..e860351 100644 (file)
@@ -23,7 +23,7 @@ function h =  findobj(propertyName, propertyValue)
         if h <> [] then
             return;
         end
-    elseif strcmpi(propertyName, "tag") == 0 then
+    elseif strcmp(propertyName, "tag", "i") == 0 then
         h = get(propertyValue);
         if h <> [] then
             return;
index b5f2e58..852caf4 100644 (file)
@@ -120,7 +120,7 @@ std::unordered_map<std::wstring, std::wstring> DeprecatedChecker::initDep()
     map.emplace(L"numdiff", L"numderivative");
     map.emplace(L"derivative", L"numderivative");
     map.emplace(L"mvvacov", L"cov");
-
+    map.emplace(L"strcmpi", L"strcmp");
     return map;
 }
 
index 2510940..9b3c87a 100644 (file)
@@ -45,8 +45,8 @@
                 <term>'i'</term>
                 <listitem>
                     <para>
-                        an optional parameter to do <function>strcmpi</function>
-                        (case independent), default value is <literal>'s'</literal>.
+                        optional parameter to compare strings in a case-independent way.
+                        Default value is <literal>'s'</literal>.
                     </para>
                 </listitem>
             </varlistentry>
@@ -98,10 +98,10 @@ strcmp(TXT1,TXT2,'s')
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="strcat">strcat</link>
+                <link linkend="convstr">convstr</link>
             </member>
             <member>
-                <link linkend="strcmpi">strcmpi</link>
+                <link linkend="comparison">comparison</link>
             </member>
         </simplelist>
     </refsection>
index 00c1bc2..5a34480 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) INRIA - 
- * 
+ * Copyright (C) INRIA -
+ *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
@@ -17,7 +17,7 @@
     <refnamediv>
         <refname>strcmpi</refname>
         <refpurpose>
-            compare character strings (case independent)
+            compare character strings (case independent). <emphasis role="bold">This function is obsolete.</emphasis>
         </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
             is equal to <varname>string_two</varname> (case independently),
             <literal>1</literal> if <varname>string_one</varname> is greater than <varname>string_two</varname> and <literal>-1</literal> else.
         </para>
+        <warning>
+            This function is obsolete. Please use <link linkend="strcmp">strcmp(s1,s1,"i")</link> instead.
+        </warning>
     </refsection>
     <refsection>
         <title>Examples</title>
-        <programlisting role="example"><![CDATA[ 
+        <programlisting role="example"><![CDATA[
 TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
 TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
 strcmpi(TXT1,TXT2)
@@ -83,4 +86,15 @@ strcmpi(TXT1,'scilab')
             </member>
         </simplelist>
     </refsection>
+    <refsection>
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0</revnumber>
+                <revdescription>
+                    Function tagged as obsolete. Will be removed from Scilab 6.1
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 525d269..e7e376c 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA - 
  * 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:ns4="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="strcmp" xml:lang="ja">
-    
     <refnamediv>
-        
         <refname>strcmp</refname>
-        
         <refpurpose>文字列を比較</refpurpose>
-        
     </refnamediv>
-    
     <refsynopsisdiv>
-        
         <title>呼び出し手順</title>
-        
         <synopsis>res = strcmp(string_one, string_two, [,'i'])</synopsis>
-        
     </refsynopsisdiv>
-    
     <refsection>
-        
         <title>引数</title>
-        
         <variablelist>
-            
             <varlistentry>
-                
                 <term>string_one</term>
-                
                 <listitem>
-                    
                     <para>文字列または文字列の行列</para>
-                    
                 </listitem>
-                
             </varlistentry>
-            
             <varlistentry>
-                
                 <term>string_two</term>
-                
                 <listitem>
-                    
                     <para>文字列または文字列の行列</para>
-                    
                 </listitem>
-                
             </varlistentry>
-            
             <varlistentry>
-                
                 <term>'i'</term>
-                
                 <listitem>
-                    
                     <para>
-                        
-                        <function>strcmpi</function>
-                        
-                        (大文字小文字に依存)を使用するためのパラメータ, デフォルト値は
-                        
-                        <literal>'s'</literal>.
-                        
+                        optional parameter to compare strings in a case-independent way.
+                        デフォルト値は <literal>'s'</literal>.
                     </para>
-                    
                 </listitem>
-                
             </varlistentry>
-            
             <varlistentry>
-                
                 <term>res</term>
-                
                 <listitem>
-                    
                     <para>整数の行列.</para>
-                    
                 </listitem>
-                
             </varlistentry>
-            
         </variablelist>
-        
     </refsection>
-    
     <refsection>
-        
         <title>説明</title>
-        
         <para>
-            
             <code>res = strcmp(string_one, string_two)</code>
-            
             (または<code>res = strcmp(string_one, string_two, 's')</code>)は,
-            
             文字列の間の関係(辞書順)を示す整数値を返します.
-            
         </para>
-        
         <para>
-            
             ゼロより大きい値は,一致しない最初の文字について,
-            
             <varname>string_one</varname>の方が
-            
             <varname>string_two</varname>よりも大きな値を有している
-            
             ことを示します.
-            
         </para>
-        
         <para>
-            
             <code>res = strcmp(string_one, string_two, 'i')</code>は,
-            
             <varname>string_one</varname> が
-            
-            <varname>string_two</varname> (大文字小文字を区別しません) 
-            
+            <varname>string_two</varname> (大文字小文字を区別しません)
             に等しい場合に<literal>0</literal>を返し,
-            
             <literal>1</literal>はその逆を示します.
-            
         </para>
-        
     </refsection>
-    
     <refsection>
-        
         <title>例</title>
-        
-        <programlisting role="example"><![CDATA[ 
+        <programlisting role="example"><![CDATA[
 TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
 TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
 strcmp(TXT1,TXT2)
@@ -153,30 +85,16 @@ strcmp(TXT1,'scilab')
 strcmp(TXT1,'SciLab')
 strcmp(TXT1,TXT2,'i')
  ]]></programlisting>
-        
     </refsection>
-    
     <refsection role="see also">
-        
         <title>参照</title>
-        
         <simplelist type="inline">
-            
             <member>
-                
-                <link linkend="strcat">strcat</link>
-                
+                <link linkend="convstr">convstr</link>
             </member>
-            
             <member>
-                
-                <link linkend="strcmpi">strcmpi</link>
-                
+                <link linkend="comparison">comparison</link>
             </member>
-            
         </simplelist>
-        
     </refsection>
-    
-</refentry>
-
+</refentry>
\ No newline at end of file
index fe0f53c..5c9a1d1 100644 (file)
@@ -21,7 +21,8 @@
         
         <refname>strcmpi</refname>
         
-        <refpurpose>文字列を比較 (大文字小文字を区別)</refpurpose>
+        <refpurpose>文字列を比較 (大文字小文字を区別) <emphasis role="bold">This function is obsolete.</emphasis>
+        </refpurpose>
         
     </refnamediv>
     
             
         </para>
         
+        <warning>
+            This function is obsolete. Please use <link linkend="strcmp">strcmp(s1,s1,"i")</link> instead.
+        </warning>
     </refsection>
     
     <refsection>
@@ -148,5 +152,16 @@ strcmpi(TXT1,'scilab')
         
     </refsection>
     
+    <refsection>
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0</revnumber>
+                <revdescription>
+                    Function tagged as obsolete. Will be removed from Scilab 6.1
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
 
index 6fbe2b8..dded2c4 100644 (file)
         <refpurpose>compara strings</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
+        <title>Seqüência de Chamamento</title>
         <synopsis>res = strcmp(string_one,string_two,[,'i'])</synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Parâmetros</title>
+        <title>Parâmetros</title>
         <variablelist>
             <varlistentry>
                 <term>string_one</term>
@@ -40,8 +40,8 @@
             <varlistentry>
                 <term>'i'</term>
                 <listitem>
-                    <para>parâmetro para realização de stricmp (caso independente), o
-                        valor padrão é 's'
+                    <para>parâmetro para realização de stricmp caso independente, o
+                        valor padrão é 's'
                     </para>
                 </listitem>
             </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
-        <title>Descrição</title>
+        <title>Descrição</title>
         <para>
             <literal>res = strcmp(string_one,string_two)</literal> retorna um
-            valor inteiro indicando a relação entre os strings.
+            valor inteiro indicando a relação entre os strings.
         </para>
-        <para>Um valor maior que zero indica que o primeiro caractere não
+        <para>Um valor maior que zero indica que o primeiro caractere não
             correspondente possui valor maior em <literal>string_one</literal> que em
             <literal>string_two</literal>
         </para>
-        <para>Um valor abaixo de zero indica o contrário.</para>
+        <para>Um valor abaixo de zero indica o contrário.</para>
     </refsection>
     <refsection>
         <title>Exemplos</title>
@@ -77,13 +77,13 @@ strcmp(TXT1,TXT2,'i')
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
-        <title>Ver Também</title>
+        <title>Ver Também</title>
         <simplelist type="inline">
             <member>
-                <link linkend="strcat">strcat</link>
+                <link linkend="convstr">convstr</link>
             </member>
             <member>
-                <link linkend="strcmpi">strcmpi</link>
+                <link linkend="comparison">comparison</link>
             </member>
         </simplelist>
     </refsection>
index 50a2da3..a543bda 100644 (file)
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="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="strcmpi" xml:lang="pt">
     <refnamediv>
         <refname>strcmpi</refname>
-        <refpurpose>compara strings (caso independente)</refpurpose>
+        <refpurpose>compara strings (caso independente)  <emphasis role="bold">This function is obsolete.</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
-        <title>Seqüência de Chamamento</title>
+        <title>Seqüência de Chamamento</title>
         <synopsis>res = strcmpi(string_one,string_two)</synopsis>
     </refsynopsisdiv>
     <refsection>
-        <title>Parâmetros</title>
+        <title>Parâmetros</title>
         <variablelist>
             <varlistentry>
                 <term>string_one</term>
         </variablelist>
     </refsection>
     <refsection>
-        <title>Descrição</title>
+        <title>Descrição</title>
         <para>
             <literal>res = strcmpi(string_one,string_two)</literal> retorna um
-            valor inteiro indicando a relação entre os strings.
+            valor inteiro indicando a relação entre os strings.
         </para>
         <para>Um valor inteiro maior que zero indica que o primeiro caractere que
-            não corresponde possui valor maior em <literal>string_one</literal> que em
+            não corresponde possui valor maior em <literal>string_one</literal> que em
             <literal>string_two</literal>
         </para>
-        <para>Um valor negativo indica o contrário.</para>
+        <para>Um valor negativo indica o contrário.</para>
+        <warning>
+            This function is obsolete. Please use <link linkend="strcmp">strcmp(s1,s1,"i")</link> instead.
+        </warning>
     </refsection>
     <refsection>
         <title>Exemplos</title>
@@ -67,7 +71,7 @@ strcmpi(TXT1,'scilab')
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
-        <title>Ver Também</title>
+        <title>Ver Também</title>
         <simplelist type="inline">
             <member>
                 <link linkend="strcat">strcat</link>
@@ -77,4 +81,15 @@ strcmpi(TXT1,'scilab')
             </member>
         </simplelist>
     </refsection>
+    <refsection>
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0</revnumber>
+                <revdescription>
+                    Function tagged as obsolete. Will be removed from Scilab 6.1
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 43fd1fe..bcef146 100644 (file)
@@ -45,8 +45,8 @@
                 <term>'i'</term>
                 <listitem>
                     <para>
-                        необязательный параметр для того, чтобы сделать <function>strcmpi</function>
-                        (независимость от регистра), значение по умолчанию - <literal>'s'</literal>.
+                        необязательный параметр для того, чтобы функция <function>strcmp</function>
+                        не учитывала регистр, значение по умолчанию - <literal>'s'</literal>.
                     </para>
                 </listitem>
             </varlistentry>
@@ -82,7 +82,7 @@
     </refsection>
     <refsection>
         <title>Примеры</title>
-        <programlisting role="example"><![CDATA[ 
+        <programlisting role="example"><![CDATA[
 TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
 TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
 strcmp(TXT1,TXT2)
@@ -96,10 +96,10 @@ strcmp(TXT1,TXT2,'s')
         <title>Смотрите также</title>
         <simplelist type="inline">
             <member>
-                <link linkend="strcat">strcat</link>
+                <link linkend="convstr">convstr</link>
             </member>
             <member>
-                <link linkend="strcmpi">strcmpi</link>
+                <link linkend="comparison">comparison</link>
             </member>
         </simplelist>
     </refsection>
index e35fe95..7598655 100644 (file)
@@ -22,7 +22,8 @@
     </refnamediv>
     <refsynopsisdiv>
         <title>Синтаксис</title>
-        <synopsis>res = strcmpi(string_one, string_two)</synopsis>
+        <synopsis>res = strcmpi(string_one, string_two)  <emphasis role="bold">Эта функция устарела.</emphasis>
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Аргументы</title>
@@ -62,6 +63,9 @@
             <varname>string_one</varname> равна <varname>string_two</varname>
             (независимо от регистра), а <literal>1</literal> указывает обратное.
         </para>
+        <warning>
+            Эта функция устарела. Пожалуйста, используйте вместо неё функцию <link linkend="strcmp">strcmp(s1,s1,"i")</link>.
+        </warning>
     </refsection>
     <refsection>
         <title>Примеры</title>
@@ -83,4 +87,15 @@ strcmpi(TXT1,'scilab')
             </member>
         </simplelist>
     </refsection>
+    <refsection>
+        <title>История</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0</revnumber>
+                <revdescription>
+                    Функция помечена как устаревшая. Будет удалена из Scilab 6.1.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 68a271f..07c6bcc 100644 (file)
@@ -15,6 +15,7 @@
 
 //===============================
 function res = strcmpi(str_one,str_two)
+    warnobsolete("strcmp", "6.1")
     res = strcmp(str_one,str_two,"i");
 endfunction
 //===============================
diff --git a/scilab/modules/string/tests/unit_tests/strcmpi.dia.ref b/scilab/modules/string/tests/unit_tests/strcmpi.dia.ref
deleted file mode 100644 (file)
index 7cff518..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2007-2008 - INRIA
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- CLI SHELL MODE -->
-//===============================
-// unit tests strcmpi
-//===============================
-TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
-TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
-TXT = 'Scilab';
-//===============================
-if strcmpi(TXT1,TXT2) <> [ 0 , 0 ; 0 , 0 ] then bugmes();quit;end
-//===============================
-if strcmpi(TXT1,TXT) <> [ 0 , 0 ; 17 , 17 ] then bugmes();quit;end
-//===============================
-if strcmpi('','') <> 0 then bugmes();quit;end
-//===============================
diff --git a/scilab/modules/string/tests/unit_tests/strcmpi.tst b/scilab/modules/string/tests/unit_tests/strcmpi.tst
deleted file mode 100644 (file)
index a1d7d56..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2007-2008 - INRIA
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-
-// <-- CLI SHELL MODE -->
-
-//===============================
-// unit tests strcmpi
-//===============================
-TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
-TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
-TXT = 'Scilab';
-//===============================
-if strcmpi(TXT1,TXT2) <> [ 0 , 0 ; 0 , 0 ] then pause,end
-//===============================
-if strcmpi(TXT1,TXT) <> [ 0 , 0 ; 17 , 17 ] then pause,end
-//===============================
-if strcmpi('','') <> 0 then pause,end
-//===============================
\ No newline at end of file