]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.49
authorfred <fred>
Sun, 24 Mar 2002 19:38:16 +0000 (19:38 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:38:16 +0000 (19:38 +0000)
bin/genheader
lily/.version
lily/symtable.cc

index fba3c1559e881553c2bc1e035b76e13ce0bb50b5..1f56088f930d30734d600ab34b63e4a83c10c7ff 100755 (executable)
@@ -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;
 
 
index 06a9091689299e709eaf171a86ff017245b54093..a3bb0ea6504b542724cc9468d8935292c98ef0aa 100644 (file)
@@ -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
 
index d49a1d34b80cf745f07d8a1bbb225f7751da2095..9dc82c0631c32160a43d9c73ccb0e0b5257db186 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  symtable.cc -- implement Symbol_table
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #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");