From: fred Date: Sun, 24 Mar 2002 19:38:16 +0000 (+0000) Subject: lilypond-0.0.49 X-Git-Tag: release/1.5.59~5017 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=aa28c0c710773bf30b59414f4f3c84edb0d897ad;p=lilypond.git lilypond-0.0.49 --- diff --git a/bin/genheader b/bin/genheader index fba3c1559e..1f56088f93 100755 --- a/bin/genheader +++ b/bin/genheader @@ -1,36 +1,60 @@ #!/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 ($PROJECT, $cwd); -$PROJECT = "the LilyPond music typesetter"; -chop($cwd = `pwd`); - -$PROJECT= "the Flower Library" if ($cwd =~ /flower/); -my $headstr ="/* +# generate the standard header of a LilyPond source file. +my $fn; + +sub + do_init +{ + $MAILADRESS=$ENV{MAILADRESS}; + @pw=(getpwuid($<)); + $username=$pw[6]; + + die "arg needed\n" if (!($#ARGV+1)); + $fn = $ARGV[0]; + + $hh_b = ($fn =~ /hh$/ ); + $inc_b= ($hh_b || $fn =~ /[ti]cc$/); +} + +sub + do_head +{ + + my $what="implement "; + $what = "declare " if ($hh_b); + my ($PROJECT, $cwd); + $PROJECT = "the LilyPond music typesetter"; + chop($cwd = `pwd`); + + $PROJECT= "the Flower Library" if ($cwd =~ /flower/); + + my $headstr ="/* $fn -- $what source file of $PROJECT (c) 1997 $username <$MAILADRESS> */\n"; - -my $startdef= $fn; -$startdef =~ s/[\.-]/_/g; -$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; } - -print $headstr, $terminatestr; - +sub do_inc +{ + my $headstr=""; + my $startdef= $fn; + $startdef =~ s/[\.-]/_/g; + $startdef =~ tr/a-z/A-Z/; + my $terminatestr="\n"; + + if ($inc_b) { + $headstr = "\n\n#ifndef $startdef\n#define $startdef\n"; + $terminatestr .= "#endif // $startdef\n" + } + + print $headstr, $terminatestr; +} +do_init; +do_head; +do_inc; diff --git a/lily/.version b/lily/.version index 06a9091689..a3bb0ea650 100644 --- a/lily/.version +++ b/lily/.version @@ -1,6 +1,6 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 47 +PATCH_LEVEL = 48 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf diff --git a/lily/symtable.cc b/lily/symtable.cc index d49a1d34b8..9dc82c0631 100644 --- a/lily/symtable.cc +++ b/lily/symtable.cc @@ -1,3 +1,11 @@ +/* + symtable.cc -- implement Symbol_table + + source file of the LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + #include "misc.hh" #include "dimen.hh" #include "debug.hh" @@ -28,7 +36,7 @@ Symtables::~Symtables() Symbol Symtable::lookup(String s) const { - if (elt_query(s)) + if (elt_b(s)) return (*this)[s]; else { error( "Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n");