]> git.donarmstrong.com Git - lilypond.git/blob - flower/warn.cc
*** empty log message ***
[lilypond.git] / flower / warn.cc
1 /*
2   warn.cc -- implement warnings
3
4   source file of the Flower Library
5
6   (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include "warn.hh"
10
11 #include <cstdlib>
12 #include <cstdio>
13
14 void
15 message (String s)
16 {
17   fputs (s.to_str0 (), stderr);
18   fflush (stderr);
19 }
20
21 void
22 warning (String s)
23 {
24   message (_f ("warning: %s", s.to_str0 ()) + "\n");
25 }
26
27 void
28 non_fatal_error (String s)
29 {
30   message (_f ("error: %s", s.to_str0 ()) + "\n");
31 }
32
33 void
34 error (String s)
35 {
36   non_fatal_error (s);
37   exit (1);
38 }
39
40 void
41 programming_error (String s)
42 {
43   message (_f ("programming error: %s", s) + "\n");
44   message (_ ("Continuing; crossing fingers") + "\n");
45 }
46