Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.60 -r1.61 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 11 Dec 2003 21:39:56 -0000 1.60 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 15 Dec 2003 10:24:07 -0000 1.61 @@ -4653,6 +4653,27 @@ return $string } +ad_proc -public util::array_list_spec_pretty { + list + {indent 0} +} { + Pretty-format an array-list spec with proper indentation. +} { + set output {} + foreach { elm val } $list { + if { [llength $val] > 1 && [expr [llength $val] % 2] == 0 } { + append output [string repeat " " $indent] "$elm \{" \n + + append output [util::array_list_spec_pretty $val [expr $indent + 4]] + + append output [string repeat " " $indent] \} \n + } else { + append output [string repeat " " $indent] [list $elm] " " [list $val] \n + } + } + return $output +} + ad_proc -public util::interval_pretty { {-seconds 0} } { @@ -4669,3 +4690,4 @@ } return $result } +