-sub source_dump_get_path ($$$) {
- my ($c,$r, $thing) = @_;
- die if $thing =~ m/\W/;
- my $pat = $r->{S}('source_dump_path_pat');
- my $leaf = sprintf $pat, $thing;
- return $r->_absify_path($leaf);
+sub srcdump_dump_thing ($$$) {
+ my ($c,$r, $thing, $outfn) = @_;
+ die if $thing =~ m/\W/ || $thing !~ m/\w/;
+ my $path = $r->_get_path('srcdump');
+ my $ctf = new IO::File "$path/$thing.ctype", 'r'
+ or die "$path/$thing.ctype $!";
+ my $ct = <$ctf>;
+ chomp $ct or die "$path/$thing ?";
+ $ct->close or die "$path/$thing $!";
+ my $df = new IO::File "$path/$thing.data", 'r'
+ or die "$path/$thing.data $!";
+ $r->_ch('dump', $ct, $df);