# HG changeset patch # User jwe # Date 1137200983 0 # Node ID 86cd3d260b42effc6e19f49412c851bb52afaa04 # Parent e0e48ea2a93c665eb0dc43afcf974f8f43c2b4a4 [project @ 2006-01-14 01:09:42 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2006-01-13 John W. Eaton + * ov-struct.cc (octave_struct::print_raw): Correctly print scalar + structs and empty struct arrays. + * DLD-FUNCTIONS/__gnuplot_raw__.l (Fclearplot): For compatibility, also turn off hold state for current figure. diff --git a/src/ov-struct.cc b/src/ov-struct.cc --- a/src/ov-struct.cc +++ b/src/ov-struct.cc @@ -413,8 +413,8 @@ if (Vstruct_levels_to_print >= 0) { - bool print_keys_only = (Vstruct_levels_to_print == 0 || - map.numel() == 0); + bool print_keys_only = (Vstruct_levels_to_print == 0 + || map.numel () == 0); Vstruct_levels_to_print--; @@ -424,9 +424,9 @@ increment_indent_level (); - octave_idx_type n = map_keys().length(); + octave_idx_type n = map.numel (); - if (n > 1 && print_keys_only) + if (n == 0 || (n > 1 && print_keys_only)) { indent (os); dim_vector dv = dims (); @@ -459,7 +459,7 @@ tmp.print_with_name (os, key); } - if (n > 1 && print_keys_only) + if (n == 0 || (n > 1 && print_keys_only)) decrement_indent_level (); decrement_indent_level ();