]> git.donarmstrong.com Git - lilypond.git/blob - lily/tex-stream.cc
patch::: 1.0.12.jcn2: opniewvisite
[lilypond.git] / lily / tex-stream.cc
1 /*
2   tex-stream.cc -- implement Tex_stream
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7
8 */
9
10 #include <fstream.h>
11 #include <time.h>
12
13 #include "tex.hh"
14 #include "main.hh"
15 #include "tex-stream.hh"
16 #include "debug.hh"
17
18 Tex_stream::Tex_stream (String filename)
19   : Paper_stream (filename)
20 {
21   header ();
22 }
23
24 void
25 Tex_stream::header ()
26 {
27   // urg, merge with Ps
28   *os << _ ("% Creator: ");
29   if (no_timestamps_global_b)
30     *os << "GNU LilyPond\n";
31   else
32     *os << get_version_str () << '\n';
33   *os << _ ("% Automatically generated");
34   if (no_timestamps_global_b)
35     *os << ".\n";
36   else
37     {
38       *os << _ (", at ");
39       time_t t (time (0));
40       *os << ctime (&t) << "%\n";
41     }
42 }
43
44 Tex_stream::~Tex_stream ()
45 {
46 }
47
48 // print string. don't forget indent.
49 Paper_stream&
50 Tex_stream::operator << (Scalar s)
51 {
52   return Paper_stream::operator << (s);
53 }
54