changeset 10316:9966f1f71c32

use DEFUNX instead of DEFUN for strcmpi and strncmpi
author John W. Eaton <jwe@octave.org>
date Thu, 11 Feb 2010 12:55:25 -0500
parents 57a59eae83cc
children 42d098307c30
files src/ChangeLog src/strfns.cc
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Feb 11 12:41:46 2010 -0500
+++ b/src/ChangeLog	Thu Feb 11 12:55:25 2010 -0500
@@ -1,3 +1,8 @@
+2010-02-11  John W. Eaton  <jwe@octave.org>
+
+	* strfns.cc (Fstrcmpi, Fstrncmpi): Use DEFUNX instead of DEFUN.
+	(Fstrncmpi): Report strncmpi in error message, not strncmp.
+
 2010-02-11  John W. Eaton  <jwe@octave.org>
 
 	* Cell.cc, bitfcns.cc, c-file-ptr-stream.cc, comment-list.cc,
--- a/src/strfns.cc	Thu Feb 11 12:41:46 2010 -0500
+++ b/src/strfns.cc	Thu Feb 11 12:55:25 2010 -0500
@@ -729,7 +729,7 @@
                          icmp_char_eq ()));
 }
 
-DEFUN (strcmpi, args, ,
+DEFUNX ("strcmpi", Fstrcmpi, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} strcmpi (@var{s1}, @var{s2})\n\
 Returns 1 if the character strings @var{s1} and @var{s2} are the same,\n\
@@ -786,7 +786,7 @@
                          icmp_char_eq ()));
 }
 
-DEFUN (strncmpi, args, ,
+DEFUN (strncmpi, Fstrncmpi, args, ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} strncmpi (@var{s1}, @var{s2}, @var{n})\n\
 Returns 1 if the first @var{n} character of @var{s1} and @var{s2} are the same,\n\
@@ -820,7 +820,7 @@
                                       strncmpi_array_op, strncmpi_str_op);
             }
           else
-            error ("strncmp: N must be greater than 0");
+            error ("strncmpi: N must be greater than 0");
         }
     }
   else