#!/usr/bin/perl -w die "arg needed\n" if (!($#ARGV+1)); my $fn = $ARGV[0]; my $hh_q = ($fn =~ /hh$/ ); my $MAILADRESS=$ENV{MAILADRESS}; my @pw=(getpwuid($<)); my $username=$pw[6]; my $what="implement "; $what = "declare " if ($hh_q); my $headstr ="/* $fn -- $what source file of the LilyPond music typesetter (c) 1997 $username <$MAILADRESS> */\n"; my $startdef= $fn; $startdef =~ s/\./_/; $startdef =~ tr/a-z/A-Z/; my $terminatestr="\n"; if ($hh_q) { $headstr .= "\n\n#ifndef $startdef\n#define $startdef\n"; $terminatestr .= "#endif // $startdef\n" } print $headstr, $terminatestr;