]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/piano-pedal-engraver.cc
resolve merge
[lilypond.git] / lily / piano-pedal-engraver.cc
index 8c919cb36f9d6d5eaab2dbb1be5a607000d2067f..4c1e52206d9d663b32d5b08358cad9378dc9dbd5 100644 (file)
@@ -1,13 +1,24 @@
 /*
-  piano-pedal-engraver.cc -- implement Piano_pedal_engraver
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2000--2006 Jan Nieuwenhuizen <janneke@gnu.org>,
+  Copyright (C) 2000--2011 Jan Nieuwenhuizen <janneke@gnu.org>,
                  Erik Sandberg <mandolaerik@gmail.com>
 
   Chris Jackson <chris@fluffhouse.org.uk> - extended to support
   bracketed pedals.
+
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "engraver.hh"
@@ -27,7 +38,9 @@
 #include "item.hh"
 
 #include "translator.icc"
+#include <cstring>
 
+#include <string.h>
 
 /*
   TODO:
@@ -40,7 +53,7 @@
 */
 
 /* Ugh: This declaration is duplicated in piano-pedal-performer */
-typedef enum Pedal_type {
+enum Pedal_type {
   SOSTENUTO,
   SUSTAIN,
   UNA_CORDA,
@@ -156,9 +169,9 @@ init_pedal_types ()
        be careful, as we don't want to loose references to the _sym_ members.
        */
       Pedal_type_info info;
-      info.event_class_sym_ = scm_str2symbol ((base_ident + "-event").c_str ());
-      info.style_sym_ = scm_str2symbol (("pedal" + base_name + "Style").c_str ());
-      info.strings_sym_ = scm_str2symbol (("pedal" + base_name + "Strings").c_str ());
+      info.event_class_sym_ = scm_from_locale_symbol ((base_ident + "-event").c_str ());
+      info.style_sym_ = scm_from_locale_symbol (("pedal" + base_name + "Style").c_str ());
+      info.strings_sym_ = scm_from_locale_symbol (("pedal" + base_name + "Strings").c_str ());
       
       info.base_name_ = name;
       info.pedal_c_str_ = strdup ((base_name + "Pedal").c_str ());
@@ -298,7 +311,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
       if (!mixed)
        {
          if (!p->start_ev_)
-           p->event_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->type_->base_name_.c_str ()));
+           p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", p->type_->base_name_.c_str ()));
          else
            s = scm_cadr (strings);
          p->start_ev_ = p->event_drul_[START];
@@ -309,7 +322,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
       if (!mixed)
        {
          if (!p->start_ev_)
-           p->event_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->type_->base_name_.c_str ()));
+           p->event_drul_[STOP]->origin ()->warning (_f ("cannot find start of piano pedal: `%s'", p->type_->base_name_.c_str ()));
          else
            s = scm_caddr (strings);
          p->start_ev_ = 0;
@@ -344,7 +357,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
 {
   if (!p->bracket_ && p->event_drul_[STOP])
     {
-      string msg = _f ("can't find start of piano pedal bracket: `%s'", p->type_->base_name_.c_str ());
+      string msg = _f ("cannot find start of piano pedal bracket: `%s'", p->type_->base_name_.c_str ());
       p->event_drul_[STOP]->origin ()->warning (msg);
       p->event_drul_[STOP] = 0;
     }
@@ -493,7 +506,6 @@ Piano_pedal_engraver::typeset_all (Pedal_info *p)
 ADD_ACKNOWLEDGER (Piano_pedal_engraver, note_column);
 
 ADD_TRANSLATOR (Piano_pedal_engraver,
-
                /* doc */
                "Engrave piano pedal symbols and brackets.",
 
@@ -510,6 +522,8 @@ ADD_TRANSLATOR (Piano_pedal_engraver,
                "pedalSustainStrings "
                "pedalSustainStyle "
                "pedalUnaCordaStrings "
-               "pedalUnaCordaStyle",
+               "pedalUnaCordaStyle ",
                
-               /* write */ "");
+               /* write */
+               ""
+               );