return $cooked;
}
-sub read_only_bottom {
- my ($sources, $lang) = @_;
+sub read_only_bottom_close_and_rename {
+ my ($fh, $sources) = @_;
+ my $name = *{$fh}->{name};
+ my $lang = *{$fh}->{lang};
+ die "No final name specified at open time for $name"
+ unless *{$fh}->{final_name};
my $comment;
if ($sources) {
$comment =~ s! \* !/* !;
$comment .= " */";
}
- return "$comment\n";
-}
-
-sub read_only_bottom_close_and_rename {
- my ($fh, $sources) = @_;
- my $name = *{$fh}->{name};
- my $lang = *{$fh}->{lang};
- die "No final name specified at open time for $name"
- unless *{$fh}->{final_name};
-
- print $fh "\n", read_only_bottom($sources, $lang);
+ print $fh "\n$comment\n";
close_and_rename($fh);
}
my $fh = open_new($uconfig_h, '>>');
-print $fh "\n", read_only_bottom([$ENV{CONFIG_SH}, 'config_h.SH']);
-
-close_and_rename($fh);
+read_only_bottom_close_and_rename($fh, [$ENV{CONFIG_SH}, 'config_h.SH']);