From 848114f18748bb70f199e6d8f6a9c6cc0cdf6a32 Mon Sep 17 00:00:00 2001 From: Joseph Wakeling Date: Sat, 12 Sep 2009 21:02:26 +0200 Subject: [PATCH 5/5] accidental.cc licensing and copyright notice. * Contributions (major and minor) tracked via git logs * Copyright credited to major contributors with dates corresponding to first and last commit * Contributors of small tweaks and corrections given brief credit in alphabetical order * ... and trailing whitespace correction courtesy of Kate editor :-) --- lily/accidental.cc | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) diff --git a/lily/accidental.cc b/lily/accidental.cc index a017cf8..16d57e0 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -1,9 +1,26 @@ /* accidental.cc -- implement Accidental_interface - source file of the GNU LilyPond music typesetter + Copyright (c) 2001--2008 Han-Wen Nienhuys + Copyright (c) 2002--2009 Jan Nieuwenhuizen + Copyright (c) 2007--2009 Joe Neeman - (c) 2001--2009 Han-Wen Nienhuys + Small corrections and tweaks by Mats Bengtsson, Werner Lemberg + and Neil Puttock. + + This source file is part of the GNU Lilypond music typesetter. + + GNU 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; version 2 of the License. + + This program 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 this program. If not, see . */ #include "accidental-interface.hh" @@ -19,7 +36,7 @@ Stencil parenthesize (Grob *me, Stencil m) { Font_metric * font - = Font_interface::get_default_font (me); + = Font_interface::get_default_font (me); Stencil open = font->find_by_name ("accidentals.leftparen"); Stencil close @@ -98,7 +115,7 @@ Accidental_interface::accurate_boxes (Grob *me, Grob **common) SCM alt = me->get_property ("alteration"); string glyph_name = robust_scm2string (ly_assoc_get (alt, alist, SCM_BOOL_F), ""); - + if (glyph_name == "accidentals.flat" || glyph_name == "accidentals.mirroredflat") { @@ -183,14 +200,14 @@ Accidental_interface::get_stencil (Grob *me) SCM alist = me->get_property ("glyph-name-alist"); SCM alt = me->get_property ("alteration"); SCM glyph_name = ly_assoc_get (alt, alist, SCM_BOOL_F); - + if (!scm_is_string (glyph_name)) { me->warning (_f ("Could not find glyph-name for alteration %s", ly_scm_write_string (alt).c_str ())); return SCM_EOL; } - + Stencil mol (fm->find_by_name (ly_scm2string (glyph_name))); if (to_boolean (me->get_property ("restore-first"))) { @@ -205,17 +222,17 @@ Accidental_interface::get_stencil (Grob *me) else mol.add_at_edge (X_AXIS, LEFT, acc, 0.1); } - + if (to_boolean (me->get_property ("parenthesized"))) mol = parenthesize (me, mol); return mol.smobbed_copy (); } - + ADD_INTERFACE (Accidental_interface, "A single accidental.", - + /* properties */ "alteration " "avoid-slur " -- 1.6.3.3