diff src/strfns.cc @ 4457:d7d9ca19960a

[project @ 2003-07-11 03:05:38 by jwe]
author jwe
date Fri, 11 Jul 2003 03:05:39 +0000
parents 83d4452bc522
children a5f23212a3d8
line wrap: on
line diff
--- a/src/strfns.cc	Fri Jul 11 01:05:33 2003 +0000
+++ b/src/strfns.cc	Fri Jul 11 03:05:39 2003 +0000
@@ -33,6 +33,7 @@
 #include "gripes.h"
 #include "ov.h"
 #include "oct-obj.h"
+#include "unwind-prot.h"
 #include "utils.h"
 
 DEFUN (char, args, ,
@@ -67,7 +68,7 @@
   int nargin = args.length ();
 
   if (nargin == 1)
-    retval = args(0).convert_to_str (true);
+    retval = args(0).convert_to_str (true, true);
   else if (nargin > 1)
     {
       int n_elts = 0;
@@ -76,11 +77,11 @@
 
       for (int i = 0; i < nargin; i++)
 	{
-	  string_vector s = args(i).all_strings ();
+	  string_vector s = args(i).all_strings (false, true);
 
 	  if (error_state)
 	    {
-	      error ("char: expecting arguments to be strings");
+	      error ("char: unable to convert some args to strings");
 	      return retval;
 	    }
 
@@ -98,7 +99,7 @@
 
       for (int i = 0; i < nargin; i++)
 	{
-	  string_vector s = args(i).all_strings ();
+	  string_vector s = args(i).all_strings (false, true);
 
 	  int n = s.length ();