diff src/pr-output.cc @ 1572:0d9e10d10bd7

[project @ 1995-10-19 04:31:30 by jwe]
author jwe
date Thu, 19 Oct 1995 04:31:30 +0000
parents 89c587478067
children 27f5ac98fc4a
line wrap: on
line diff
--- a/src/pr-output.cc	Thu Oct 19 04:21:41 1995 +0000
+++ b/src/pr-output.cc	Thu Oct 19 04:31:30 1995 +0000
@@ -42,7 +42,6 @@
 #include "error.h"
 #include "help.h"
 #include "mappers.h"
-#include "oct-str.h"
 #include "pager.h"
 #include "pr-output.h"
 #include "sysdep.h"
@@ -1454,29 +1453,36 @@
 }
 
 void
-octave_print_internal (ostream& os, Octave_str_obj& s,
-		       int pr_as_read_syntax)
+octave_print_internal (ostream& os, const charMatrix& chm,
+		       int pr_as_read_syntax, int pr_as_string)
 {
-  int nstr = s.num_strings ();
+  if (pr_as_string)
+    {
+      int nstr = chm.rows ();
 
-  if (pr_as_read_syntax && nstr > 1)
-    os << "[ ";
+      if (pr_as_read_syntax && nstr > 1)
+	os << "[ ";
 
-  for (int i = 0; i < nstr; i++)
-    {
-      if (pr_as_read_syntax)
+      for (int i = 0; i < nstr; i++)
 	{
-	  os << "\"" << s.elem (i) << "\"";
+	  if (pr_as_read_syntax)
+	    {
+	      os << "\"" << chm.row_as_string (i) << "\"";
 
-	  if (i < nstr - 1)
-	    os << "; ";
+	      if (i < nstr - 1)
+		os << "; ";
+	    }
+	  else
+	    os << chm.row_as_string (i) << "\n";
 	}
-      else
-	os << s.elem (i) << "\n";
+
+      if (pr_as_read_syntax && nstr > 1)
+	os << " ]";
     }
-
-  if (pr_as_read_syntax && nstr > 1)
-    os << " ]";
+  else
+    {
+      os << "sorry, printing char matrices not implemented yet\n";
+    }
 }
 
 DEFUN ("disp", Fdisp, Sdisp, 10,