File: print_table.pl

package info (click to toggle)
tct 1.07-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,828 kB
  • ctags: 1,128
  • sloc: perl: 9,604; ansic: 4,861; makefile: 516; sh: 77
file content (29 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
# print_table - print a time machine table
#
sub print_table {
    local(%table) = @_;

    #
    # The origin info.
    #
    foreach $origin (keys %{$table{'origin'}}) {
	print "origin: $origin $table{'origin'}{$origin}\n";
    }

    #
    # The data dictionary.
    #
    foreach $label (keys %{$table{'labels'}}) {
	print "offset: $label $table{'labels'}{$label}\n";
    }

    #
    # The actual data.
    #
    for $n (0..$#{$table{'data'}}) {
	print join(':', @{$table{'data'}[$n]}),"\n";
    }
}

1;