X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-marker.cc;h=af62bdc95e27409ce44c14eea4bd4740ffe5f956;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=7bf691e29582b9b976f683cafa5acb41da73521b;hpb=62f221b6b3861ff055dc0384ec3c48cc665688cd;p=lilypond.git diff --git a/lily/page-marker.cc b/lily/page-marker.cc index 7bf691e295..af62bdc95e 100644 --- a/lily/page-marker.cc +++ b/lily/page-marker.cc @@ -1,13 +1,23 @@ /* - page-marker.cc -- implement Page_marker + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2007--2015 Nicolas Sceaux - (c) 2007--2008 Nicolas Sceaux + 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 . */ #include "page-marker.hh" -#include "ly-smobs.icc" Page_marker::Page_marker () { @@ -17,33 +27,30 @@ Page_marker::Page_marker () smobify_self (); } +Page_marker::Page_marker (Page_marker const &src) + : Smob () +{ + symbol_ = src.symbol_; + permission_ = src.permission_; + label_ = src.label_; + smobify_self (); +} + Page_marker::~Page_marker () { } -IMPLEMENT_SMOBS (Page_marker); -IMPLEMENT_DEFAULT_EQUAL_P (Page_marker); -IMPLEMENT_TYPE_P (Page_marker, "ly:page-marker?"); +const char * const Page_marker::type_p_name_ = "ly:page-marker?"; SCM -Page_marker::mark_smob (SCM smob) +Page_marker::mark_smob () const { - Page_marker *pm = (Page_marker *) SCM_CELL_WORD_1 (smob); - scm_gc_mark (pm->symbol_); - scm_gc_mark (pm->permission_); - scm_gc_mark (pm->label_); + scm_gc_mark (symbol_); + scm_gc_mark (permission_); + scm_gc_mark (label_); return SCM_EOL; } -int -Page_marker::print_smob (SCM smob, SCM port, scm_print_state*) -{ - Page_marker *pm = (Page_marker *) SCM_CELL_WORD_1 (smob); - (void)pm; - scm_puts ("#", port); - return 1; -} - SCM Page_marker::permission_symbol () { @@ -74,5 +81,3 @@ Page_marker::set_label (SCM label) { label_ = label; } - -