lilypond-1.3.15
[lilypond.git] / lily / header.cc
blobfc95d2f8b279869b9123c71b057c07695f5bae34
1 /*
2 header.cc -- implement Header
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 Jan Nieuwenhuizen <janneke@gnu.org>
8 */
10 #include "string.hh"
11 #include "dictionary-iter.hh"
12 #include "header.hh"
13 #include "main.hh"
15 extern char const *lily_version_number_sz ();
17 Header::Header ()
19 lily_id_str_ = "Lily was here, " +
20 String (lily_version_number_sz ());
23 //urg
24 String
25 Header::tex_string () const
27 String s;
29 s+= "\\def\\LilyIdString{" + lily_id_str_ + "}";
31 for (Dictionary_iter<String> i (*this); i.ok (); i++)
32 s += "\\def\\mudela" + i.key () + "{" + i.val () + "}\n";
33 return s;
36 String
37 Header::ps_string () const
39 String s;
41 s+= "/lily_id_string\n{" + lily_id_str_ + "} bind def\n";
43 for (Dictionary_iter<String> i (*this); i.ok (); i++)
44 s += "/mudela" + i.key () + "{" + i.val () + "} bind def\n";
45 return s;