# HG changeset patch
# User Rik <rik@octave.org>
# Date 1625178561 25200
#      Thu Jul 01 15:29:21 2021 -0700
# Node ID c3b92a73e4f54885e5922fd961587e578f9dd570
# Parent  2ef9080ca01714b002ca316d05c5fab8f57b8dd2
[mq]: whos

diff -r 2ef9080ca017 -r c3b92a73e4f5 libinterp/corefcn/syminfo.cc
--- a/libinterp/corefcn/syminfo.cc	Wed Jun 30 17:52:03 2021 -0400
+++ b/libinterp/corefcn/syminfo.cc	Thu Jul 01 15:29:21 2021 -0700
@@ -109,13 +109,14 @@ namespace octave
               {
               case 'a':
                 {
-                  char tmp[5];
+                  char tmp[6];
 
                   tmp[0] = (m_is_complex ? 'c' : ' ');
-                  tmp[1] = (m_is_formal ? 'f' : ' ');
-                  tmp[2] = (m_is_global ? 'g' : ' ');
-                  tmp[3] = (m_is_persistent ? 'p' : ' ');
-                  tmp[4] = 0;
+                  tmp[1] = (m_is_sparse ? 's' : ' ');
+                  tmp[2] = (m_is_formal ? 'f' : ' ');
+                  tmp[3] = (m_is_global ? 'g' : ' ');
+                  tmp[4] = (m_is_persistent ? 'p' : ' ');
+                  tmp[5] = 0;
 
                   os << tmp;
                 }
@@ -393,8 +394,8 @@ namespace octave
     for (std::size_t i = 0; i < param_string.length (); i++)
       param_length(i) = param_names(i).length ();
 
-    // The attribute column needs size 5.
-    param_length(pos_a) = 5;
+    // The attribute column needs size 6.
+    param_length(pos_a) = 6;
 
     // Calculating necessary spacing for name column,
     // bytes column, elements column and class column
diff -r 2ef9080ca017 -r c3b92a73e4f5 libinterp/corefcn/syminfo.h
--- a/libinterp/corefcn/syminfo.h	Wed Jun 30 17:52:03 2021 -0400
+++ b/libinterp/corefcn/syminfo.h	Thu Jul 01 15:29:21 2021 -0700
@@ -59,8 +59,8 @@ namespace octave
     symbol_info (const std::string& name, const octave_value& value,
                  bool is_formal, bool is_global, bool is_persistent)
       : m_name (name), m_value (value), m_is_complex (value.iscomplex ()),
-        m_is_formal (is_formal), m_is_global (is_global),
-        m_is_persistent (is_persistent)
+        m_is_sparse (value.issparse ()), m_is_formal (is_formal),
+        m_is_global (is_global), m_is_persistent (is_persistent)
     { }
 
     std::string name (void) const { return m_name; }
@@ -69,6 +69,8 @@ namespace octave
 
     bool is_complex (void) const { return m_is_complex; }
 
+    bool is_sparse (void) const { return m_is_sparse; }
+
     bool is_formal (void) const { return m_is_formal; }
 
     bool is_global (void) const { return m_is_global; }
@@ -82,6 +84,7 @@ namespace octave
     std::string m_name;
     octave_value m_value;
     bool m_is_complex;
+    bool m_is_sparse;
     bool m_is_formal;
     bool m_is_global;
     bool m_is_persistent;
diff -r 2ef9080ca017 -r c3b92a73e4f5 libinterp/parse-tree/pt-eval.cc
--- a/libinterp/parse-tree/pt-eval.cc	Wed Jun 30 17:52:03 2021 -0400
+++ b/libinterp/parse-tree/pt-eval.cc	Thu Jul 01 15:29:21 2021 -0700
@@ -5214,7 +5214,9 @@ the left of the specified balance column
 
 The default format is:
 
-@qcode{"  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;@backslashchar{}n"}
+@example
+"  %a:5; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;@backslashchar{}n"
+@end example
 
 When called from inside a function with the @qcode{"local"} option, the
 variable is changed locally for the function and any subroutines it calls.
diff -r 2ef9080ca017 -r c3b92a73e4f5 libinterp/parse-tree/pt-eval.h
--- a/libinterp/parse-tree/pt-eval.h	Wed Jun 30 17:52:03 2021 -0400
+++ b/libinterp/parse-tree/pt-eval.h	Thu Jul 01 15:29:21 2021 -0700
@@ -133,7 +133,7 @@ namespace octave
         m_call_stack (*this), m_profiler (), m_debug_frame (0),
         m_debug_mode (false), m_quiet_breakpoint_flag (false),
         m_debugger_stack (), m_exit_status (0), m_max_recursion_depth (256),
-        m_whos_line_format ("  %a:4; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;\n"),
+        m_whos_line_format ("  %a:5; %ln:6; %cs:16:6:1;  %rb:12;  %lc:-1;\n"),
         m_silent_functions (false), m_string_fill_char (' '), m_PS4 ("+ "),
         m_dbstep_flag (0), m_break_on_next_stmt (false), m_echo (ECHO_OFF),
         m_echo_state (false), m_echo_file_name (), m_echo_file_pos (1),
