X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Finclude%2Fwarn.hh;h=f52d3818cc11ae91569fa467b6128170673ffe13;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=7d381f1f08e3d01c832e16f7650922b57848fd16;hpb=f40abd6c55ade9dba9be72ddb415f23a58bb003e;p=lilypond.git diff --git a/flower/include/warn.hh b/flower/include/warn.hh index 7d381f1f08..f52d3818cc 100644 --- a/flower/include/warn.hh +++ b/flower/include/warn.hh @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2011 Han-Wen Nienhuys + Copyright (C) 1997--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,24 +41,28 @@ #define LOGLEVEL_DEBUG (LOGLEVEL_INFO | LOG_DEBUG) extern int loglevel; +extern bool warning_as_error; /* output messages, in decreasing order of importance */ -void error (string s, string location = ""); // Fatal error, exits lilypond! -void programming_error (string s, string location = ""); -void non_fatal_error (string, string location = ""); -void warning (string s, string location = ""); -void successful (string s, string location = ""); +void error (string s, const string &location = ""); // Fatal error, exits lilypond! +void programming_error (const string &s, const string &location = ""); +void non_fatal_error (const string&, const string &location = ""); +void warning (const string &s, const string &location = ""); +void basic_progress (const string &s, const string &location = ""); /* progress_indication does by default *NOT* start on a new line */ -void progress_indication (string s, bool newline = false, string location = ""); -void message (string s, bool newline = true, string location = ""); -void debug_output (string s, bool newline = true, string location = ""); +void progress_indication (const string &s, bool newline = false, const string &location = ""); +void message (const string &s, bool newline = true, const string &location = ""); +void debug_output (const string &s, bool newline = true, const string &location = ""); /* Helper functions that always print out the message. Callers should ensure that the loglevel is obeyed */ -void print_message (int level, string location, string s, bool newline = true); +void print_message (int level, const string &location, string s, bool newline = true); bool is_loglevel (int level); void set_loglevel (int level); void set_loglevel (string level); +void expect_warning (const string &msg); +void check_expected_warnings (); + #endif /* WARN_HH */