/*
- warn.cc -- implement warnings
+ This file is part of LilyPond, the GNU music typesetter.
- source file of the Flower Library
+ Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
- (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ 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 <http://www.gnu.org/licenses/>.
*/
#include "warn.hh"
/* Display user information that is not a full message. */
void
-progress_indication (std::string s)
+progress_indication (string s)
{
/* Test if all silly progress_indication ("\n") can be dropped now. */
if (s == "\n")
/* Display a single user message. Always starts on a new line. */
void
-message (std::string s)
+message (string s)
{
if (!progress_newline)
fputc ('\n', stderr);
progress_indication (s);
}
+/* Display a success message. Always starts on a new line. */
+void
+successful (string s)
+{
+ message (_f ("success: %s", s.c_str ()) + "\n");
+}
+
/* Display a warning message. Always starts on a new line. */
void
-warning (std::string s)
+warning (string s)
{
message (_f ("warning: %s", s.c_str ()) + "\n");
}
void
-non_fatal_error (std::string s)
+non_fatal_error (string s)
{
message (_f ("error: %s", s.c_str ()) + "\n");
}
/* Display an error message. Always starts on a new line. */
void
-error (std::string s)
+error (string s)
{
non_fatal_error (s);
exit (1);
}
void
-programming_error (std::string s)
+programming_error (string s)
{
message (_f ("programming error: %s", s) + "\n");
message (_ ("continuing, cross fingers") + "\n");