# HG changeset patch # User jwe # Date 796689302 0 # Node ID 50cc3480a2db9338047b8695e7fe1925645304ac # Parent 4f1bfa351b992306cccb64f60a7c8a276d47ad18 [project @ 1995-03-31 22:35:02 by jwe] diff -r 4f1bfa351b99 -r 50cc3480a2db src/tc-rep.cc --- a/src/tc-rep.cc Fri Mar 31 22:21:38 1995 +0000 +++ b/src/tc-rep.cc Fri Mar 31 22:35:02 1995 +0000 @@ -60,6 +60,18 @@ // Indentation level for structures. static int structure_indent_level = 0; +static void +increment_structure_indent_level (void) +{ + structure_indent_level += 2; +} + +static void +decrement_structure_indent_level (void) +{ + structure_indent_level -= 2; +} + static int any_element_is_complex (const ComplexMatrix& a) { @@ -1772,12 +1784,12 @@ unwind_protect_int (structure_indent_level); unwind_protect_int (user_pref.struct_levels_to_print); - structure_indent_level += 2; - if (user_pref.struct_levels_to_print > 0) { user_pref.struct_levels_to_print--; + increment_structure_indent_level (); + for (Pix p = a_map->first (); p != 0; a_map->next (p)) { const char *key = a_map->key (p); @@ -1794,6 +1806,8 @@ val.print (output_buf); } + decrement_structure_indent_level (); + output_buf.form ("%*s%s", structure_indent_level, "", "}\n"); } else