2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1997--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
25 #include "international.hh"
29 /* Is progress indication at NEWLINE? */
30 static bool progress_newline
= true;
32 /* Display user information that is not a full message. */
34 progress_indication (string s
)
36 /* Test if all silly progress_indication ("\n") can be dropped now. */
40 fputs (s
.c_str (), stderr
);
43 progress_newline
= s
[s
.length () - 1] == '\n';
46 /* Display a single user message. Always starts on a new line. */
50 if (!progress_newline
)
52 progress_indication (s
);
55 /* Display a success message. Always starts on a new line. */
59 message (_f ("success: %s", s
.c_str ()) + "\n");
62 /* Display a warning message. Always starts on a new line. */
66 message (_f ("warning: %s", s
.c_str ()) + "\n");
70 non_fatal_error (string s
)
72 message (_f ("error: %s", s
.c_str ()) + "\n");
75 /* Display an error message. Always starts on a new line. */
84 programming_error (string s
)
86 message (_f ("programming error: %s", s
) + "\n");
87 message (_ ("continuing, cross fingers") + "\n");