+fn print_cname(ctype: u32, size: u64, off: u64, depth: u8) {
+ for _ in 0..depth { print!(" "); }
+ let tag = [(ctype >> 24) as u8, (ctype >> 16) as u8, (ctype >> 8) as u8, ctype as u8];
+ let mut printable = true;
+ for &ch in tag.iter() {
+ if ch < 0x20 || ch > 0x7F {
+ printable = false;
+ break;
+ }
+ }
+ if printable {
+ print!(" '{}{}{}{}'", tag[0] as char, tag[1] as char, tag[2] as char, tag[3] as char);
+ } else {
+ print!(" {:08X}", ctype);
+ }
+ println!(" size {} @ {:X}", size, off);
+}
+