lilypond-0.0.32
[lilypond.git] / genheader
blobde9e7bf1e3dd931a5229e2f18d82b5ef72fa37e6
1 #!/usr/bin/perl -w
3 die "arg needed\n" if (!($#ARGV+1));
4 my $fn = $ARGV[0];
5 my $hh_q = ($fn =~ /hh$/ );
6 my $MAILADRESS=$ENV{MAILADRESS};
7 my @pw=(getpwuid($<));
8 my $username=$pw[6];
9 my $what="implement ";
10 $what = "declare " if ($hh_q);
11 my $headstr ="/*
12 $fn -- $what
14 source file of the LilyPond music typesetter
16 (c) 1997 $username <$MAILADRESS>
17 */\n";
19 my $startdef= $fn;
20 $startdef =~ s/\./_/;
21 $startdef =~ tr/a-z/A-Z/;
22 my $terminatestr="\n";
23 if ($hh_q) {
24 $headstr .= "\n\n#ifndef $startdef\n#define $startdef\n";
25 $terminatestr .= "#endif // $startdef\n"
28 print $headstr, $terminatestr;